Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set error span status #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Set error span status #67

wants to merge 1 commit into from

Conversation

lodthe
Copy link

@lodthe lodthe commented Dec 6, 2023

The generator config allows us to specify tag sets for each route.
It's convenient to use the error: true span attribute to mark a span as an error (I think it came from opentracing). But some systems ignore this tag and only look at the span status.

What is the current behavior?

If the error tag is specified in route configuration, it's added to the span attributes and propagated to parental spans.
Span status is not modified.

What is the new behavior?

Now when a span has the error attribute, the span status is updated to Error as suggested in the OpenTelemetry docs.


Pull request checklist

Please check if your PR fulfills the following requirements:

  • [] Tests(make test) for the changes have been added (for bug fixes / features) and pass
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Lint (make lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Does this introduce a breaking change?

  • Yes
  • No

Other information

Update the span status if it has the `error` attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant