Skip to content

Opentracing contrib: DroppedSpan has no attribute transaction #683

@JeckyTian

Description

@JeckyTian

Describe the bug: ...
When using Elastic APM with Opentracing, the program crashes on AttributeError: DroppedSpan object has no attribute transaction exception if span.finish() is called.
It turns out to be this line:

self.elastic_apm_ref.transaction.end_span()

It will access transaction attribute which does NOT exist for DroppedSpan.

Expected behavior: ...
It should be expected to behave normally even if it's DroppedSpan.

Environment (please complete the following information)

  • OS: [e.g. Linux] Linux
  • Python version: 2.7
  • Framework and version [e.g. Django 2.1]: N/A
  • APM Server version: 7.4.0
  • Agent version: 5.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions