You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there are quite a few feature requests in this thread and some discussion that just confuses users. I would like to close this issue since it is a bit confusing and open separate issues for those, if that sounds OK to everyone.
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().
Something like async with tracer.start_span_async("span"): ...
I think we determined in comments that almost no-one needs this right now as you should be using BatchSpanProcessor to avoid making your instrumentation block (details here).
This would enable async implementations of SpanProcessors (not so useful IMO as SpanProcessor work should be fire-and-forget) and Samplers (may be useful for remote sampling).
Use an event loop to manage exporting intervals in BatchSpanProcessor and PeriodicExportingMetricReader
We could avoid creating a new background thread in each instance of those classes and simplify the synchronization logic. Would work nicely with async exporters and async callbacks which could all run in the same event loop.
tracer.start_as_current_span()
decorator work with async functions #3270tracer.start_as_current_span_async()
Support async/await syntax #62 (comment). IMO this is confusing because it would only be a decorator unlikestart_as_current_span()
.async with tracer.start_span_async("span"): ...
BatchSpanProcessor
to avoid making your instrumentation block (details here).I'll throw another one in
BatchSpanProcessor
andPeriodicExportingMetricReader
Originally posted by @aabmass in #62 (comment)
The text was updated successfully, but these errors were encountered: