open-telemetry / open-telemetry/opentelemetry-python

Add async context manager for starting a span

Open
#3,271 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request tracing
Dominant language
Python
Stars
2.6k
Forks
1k
Avg merge
4d 15h
Merged PRs (30d)
19

Description

Originally from https://github.com/open-telemetry/opentelemetry-python/issues/62#issuecomment-1133862696

  • 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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked issue #62 discussion and its comments, then inspect the Python API and SDK span lifecycle entry points. Clarify the intended async context-manager behavior, including whether async SpanProcessors or Samplers are in scope; done requires an agreed design and corresponding coverage for the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.