open-telemetry / open-telemetry/opentelemetry-java
Add documentation on how to remove the span and disable implicit child spans for a particular code path
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
Currently, the best way to how to remove the span and disable implicit child spans for a particular code path is probably this
try (Scope ignored = TracingContextUtils.currentContextWith(DefaultSpan.getInvalid())) {
// Since scoped span is invalid, no tracing happens.
}
This should be documented, possibly with a helper somewhere, something like Scope withTracingDisabled().
/cc @marcingrzejszczak
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no target file or test; start with the Java example using TracingContextUtils and DefaultSpan.getInvalid(), then locate the existing tracing-context documentation. Done means the documented guidance explains how to remove a span and suppress implicit child spans for one code path, and clearly resolves whether a helper such as Scope withTracingDisabled() is needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100