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
Adds project to wrap OTel SpanProcessor/SpanExporter as Money SpanHandler #147
Conversation
Working out the general shape of the API and then I plan on adding modules that wrap the exporters for Zipkin and Jaeger that can pull their configuration from TypeSafe. |
Codecov Report
@@ Coverage Diff @@
## master #147 +/- ##
==========================================
+ Coverage 89.28% 93.82% +4.54%
==========================================
Files 55 59 +4
Lines 1008 1053 +45
Branches 62 75 +13
==========================================
+ Hits 900 988 +88
+ Misses 108 65 -43
Continue to review full report at Codecov.
|
woot, codecov report! I'm going to take the WIP off of this PR. I still have docs to add but I think functionally it's finished. |
Added Scaladocs with sample config. Also added an integration test for Zipkin. Writing one for Jaeger would require using test containers which would be possible but a bit more involved. |
PowerMockito.when(BatchSpanProcessor.newBuilder(spanExporter)).thenReturn(batchSpanProcessorBuilder); | ||
PowerMockito.when(SimpleSpanProcessor.newBuilder(spanExporter)).thenReturn(simpleSpanProcessorBuilder); | ||
PowerMockito.when(batchSpanProcessorBuilder.build()).thenReturn(batchSpanProcessor); | ||
PowerMockito.when(simpleSpanProcessorBuilder.build()).thenReturn(simpleSpanProcessor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can power mock give false positives in your experience?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had any serious problems with it. I hate reaching for it when it comes to Unit testing but a lot of the OTel APIs aren't mock-friendly, these builders are all final
classes.
youve got conflicts |
…cessor # Conflicts: # money-api/src/main/java/com/comcast/money/api/SpanId.java
Enables wrapping an OTel SpanProcessor/SpanExporter as a Money SpanHandler so that Money can report spans directly to OpenTelemetry-compatible exporters, like ZipKin and Jaeger.