Skip to content

Make tracer.start_as_current_span() decorator work with async functions #3270

@aabmass

Description

@aabmass

Originaly from #62 (comment)

Alternatives:

  • Document that it doesn't work. Adding a note doesn't hurt anyone, but I think the type annotations are pretty clear here and a type checker should catch this issue as well.
  • Add a separate tracer.start_as_current_span_async() Support async/await syntax #62 (comment). IMO this is confusing because it would only be a decorator unlike start_as_current_span().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions