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

Remove BaseShimObject, TelemetryInfo #5087

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

jack-berg
Copy link
Member

Was going through the opentracing shim and noticed that a few things making the code more complicated than needed. Most classes extend BaseShimObject, which simply gives access to TelemetryInfo fields. TelemetryInfo is just a holder for a Tracer, Baggage.empty(), and OpenTracingPropagators. I've adjusted the code so each of the components only has the things it needs (normally either Tracer or OpenTracingPropagators) and removed the BaseShimObject. The result is simpler and easier to understand.

I've also reduced the visibility of a few constructors and methods.

@jack-berg jack-berg requested a review from a team January 5, 2023 16:58
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Base: 91.06% // Head: 91.06% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (3536704) compared to base (1f975b3).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #5087   +/-   ##
=========================================
  Coverage     91.06%   91.06%           
+ Complexity     4888     4880    -8     
=========================================
  Files           553      551    -2     
  Lines         14453    14448    -5     
  Branches       1381     1387    +6     
=========================================
- Hits          13161    13157    -4     
+ Misses          895      894    -1     
  Partials        397      397           
Impacted Files Coverage Δ
...telemetry/opentracingshim/NoopSpanBuilderShim.java 100.00% <100.00%> (ø)
...opentracingshim/OpenTracingPropagatorsBuilder.java 100.00% <100.00%> (ø)
...opentelemetry/opentracingshim/OpenTracingShim.java 100.00% <100.00%> (ø)
.../io/opentelemetry/opentracingshim/Propagation.java 88.23% <100.00%> (+0.73%) ⬆️
...pentelemetry/opentracingshim/ScopeManagerShim.java 94.11% <100.00%> (-0.62%) ⬇️
...va/io/opentelemetry/opentracingshim/ScopeShim.java 100.00% <100.00%> (ø)
...opentelemetry/opentracingshim/SpanBuilderShim.java 94.82% <100.00%> (+0.04%) ⬆️
...opentelemetry/opentracingshim/SpanContextShim.java 100.00% <100.00%> (+8.69%) ⬆️
...ava/io/opentelemetry/opentracingshim/SpanShim.java 91.07% <100.00%> (ø)
...a/io/opentelemetry/opentracingshim/TracerShim.java 78.12% <100.00%> (+2.26%) ⬆️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jack-berg
Copy link
Member Author

@carlosalberto / @jkwatson let me know if you have any opinions on this. I have another small set of changes that builds on this in preparation for stabilizing the opentracing shim.

@jkwatson
Copy link
Contributor

jkwatson commented Jan 9, 2023

@carlosalberto / @jkwatson let me know if you have any opinions on this. I have another small set of changes that builds on this in preparation for stabilizing the opentracing shim.

no opinion from me on this one

@jack-berg jack-berg merged commit b8f7a87 into open-telemetry:main Jan 10, 2023
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.

3 participants