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

Add error tag to spans for Jaeger exporter #1141

Merged
merged 2 commits into from
Apr 26, 2020
Merged

Add error tag to spans for Jaeger exporter #1141

merged 2 commits into from
Apr 26, 2020

Conversation

sleighzy
Copy link
Contributor

@sleighzy sleighzy commented Apr 25, 2020

The auto-instrumentation libraries add errors to the spans when they occur. The error tag is not added to the spans by the Jaeger exporter if the span status code is not OK.
When sending these spans to the OpenTelemetry Collector it will automatically add the error tag when it translates them, based on the status code, and sends them to the Jaeger collector.
This process does not take place when sending spans directly to a Jaeger collector (not using the OTel collector) and so the Jaeger UI does not display visual indicators for spans with errors.
By adding the error tag in the Adapter class if the span.status.code is not OK, if this tag hasn't already been added, means that it will be present when using either the OTel collector
or the Jaeger collector directly. The Otel collector will remove this tag automatically when it receives the span and sets the status code so this will not be sent as a duplicate.

Fixes #1139

The auto-instrumentation libraries add errors to the spans when they occur. The error tag is not added to the spans by the Jaeger exporter if the span status is not OK.
When sending these spans to the OpenTelemetry Collector it will add the error tag when it translates them and sends them to the Jaeger collector. This process does not
take place when sending spans directly to a Jaeger collector (not using the OTel collector) and so the Jaeger UI does not display visual indicators for spans with errors.
Adding the error tag in the adapter if the span.status.code is not OK, and this tag hasn't already been set, means that it will be present when using either the OTel collector
or the Jaeger collector directly. The Otel collector will remove this tag automatically when it receives the span and sets the status code so this will not be sent as a duplicate.
@codecov-io
Copy link

Codecov Report

Merging #1141 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1141   +/-   ##
=========================================
  Coverage     85.09%   85.10%           
- Complexity     1120     1121    +1     
=========================================
  Files           144      144           
  Lines          4254     4256    +2     
  Branches        384      385    +1     
=========================================
+ Hits           3620     3622    +2     
  Misses          484      484           
  Partials        150      150           
Impacted Files Coverage Δ Complexity Δ
...ava/io/opentelemetry/exporters/jaeger/Adapter.java 96.87% <100.00%> (+0.06%) 21.00 <0.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b90ccc...d42c262. Read the comment docs.

@bogdandrutu bogdandrutu merged commit 8dd6282 into open-telemetry:master Apr 26, 2020
@sleighzy sleighzy deleted the add-error-tag-to-jaeger-exporter-spans branch April 26, 2020 21:30
@jkwatson jkwatson added this to the May Release milestone May 1, 2020
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.

Jaeger exporter does not set error boolean
5 participants