open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Add "otel.status_description" in WithSpan annotation implementation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Is your feature request related to a problem? Please describe.
When using WithSpan annotation, if there is an exception thrown, the annotation has set the "otel.status_code", but it didn't set the "otel.status_description".
This is important, because the enduser would like to know what cause the error.
Describe the solution you'd like
Set "otel.status_description" when otel.status_code is set as ERROR.
Describe alternatives you've considered
I didn't find the specification about how to give status description. But I see .NET has this, and my commercial endpoint also ask this attributes.
Additional context
https://github.com/open-telemetry/opentelemetry-java-instrumentation/discussions/6525
I am able to set up a server and a client, and a local collector, saw the detailed span output. Status message : is empty.
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
Start at the WithSpan annotation implementation and trace how exceptions currently set otel.status_code to ERROR. Identify the related tests or entry point, then verify that an exception’s cause is represented in otel.status_description and that the resulting span output is no longer empty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100