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

Don't set span status to OK on every successful trace stopping #966

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented Jun 14, 2024

Goal

Don't explicit set the status of a span when we call end() in EmbraceSpan. This means that UNSET will be a valid status value for a completed span, per OTLP.

Testing

Fixed up tests to not look for OK status to denote a completed span, but rather that an end time has been set.

Copy link
Collaborator Author

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.03%. Comparing base (eea96b9) to head (7ce1a35).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #966      +/-   ##
==========================================
+ Coverage   80.90%   81.03%   +0.13%     
==========================================
  Files         444      444              
  Lines       11824    11824              
  Branches     1807     1807              
==========================================
+ Hits         9566     9582      +16     
+ Misses       1465     1448      -17     
- Partials      793      794       +1     
Files Coverage Δ
...io/embrace/android/embracesdk/anr/AnrOtelMapper.kt 87.17% <100.00%> (ø)
.../android/embracesdk/anr/ndk/NativeAnrOtelMapper.kt 77.19% <100.00%> (ø)
...oid/embracesdk/internal/spans/EmbraceExtensions.kt 84.74% <100.00%> (-0.26%) ⬇️
...droid/embracesdk/internal/spans/EmbraceSpanImpl.kt 86.61% <100.00%> (-0.11%) ⬇️
...mbrace/android/embracesdk/opentelemetry/EmbSpan.kt 91.66% <66.66%> (+0.49%) ⬆️

... and 5 files with indirect coverage changes

@bidetofevil bidetofevil marked this pull request as ready for review June 15, 2024 05:48
@bidetofevil bidetofevil requested a review from a team as a code owner June 15, 2024 05:48
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bidetofevil bidetofevil merged commit 070a69a into master Jun 17, 2024
4 checks passed
@bidetofevil bidetofevil deleted the hho/span-status-setting branch June 17, 2024 21:34
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.

2 participants