opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Added SpanProcessor OnEnding callback

Open JonasKunz opened this issue 10 months ago • 3 comments

Implementation for the spec change https://github.com/open-telemetry/opentelemetry-specification/pull/4024.

JonasKunz avatar Apr 09 '24 10:04 JonasKunz

Codecov Report

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

Project coverage is 90.01%. Comparing base (3e8092d) to head (80aa059). Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
.../main/java/io/opentelemetry/sdk/trace/SdkSpan.java 96.42% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6367      +/-   ##
============================================
- Coverage     90.05%   90.01%   -0.05%     
- Complexity     6276     6330      +54     
============================================
  Files           697      703       +6     
  Lines         18949    19086     +137     
  Branches       1858     1881      +23     
============================================
+ Hits          17065    17180     +115     
- Misses         1312     1331      +19     
- Partials        572      575       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 07 '24 10:08 codecov[bot]

I approve of putting this in a separate interface. But, we should provide documentation on how someone could use this, as well.

jkwatson avatar Aug 22 '24 01:08 jkwatson

But, we should provide documentation on how someone could use this, as well.

What do you think would be the best place for this? Just a javadoc in ExtendedSpanProcessor or do we have some markdown files somewhere where this would fit in nicely?

JonasKunz avatar Aug 26 '24 08:08 JonasKunz

What do you think would be the best place for this? Just a javadoc in ExtendedSpanProcessor or do we have some markdown files somewhere where this would fit in nicely?

I think the ideal way to do this is a unit test. Let's add an ExtendedSpanProcessorUsageTest akin to what we do in the api incubator. No obvious place to link to the usage test at the moment, but let's start by at least demonstrating its usage in clear terms.

jack-berg avatar Aug 28 '24 19:08 jack-berg