open-telemetry / open-telemetry/opentelemetry-java-instrumentation

Add "otel.status_description" in WithSpan annotation implementation

Open
#6,710 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked on specification enhancement
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.