-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update to OpenTelemetry 0.10.0 #156
Conversation
The biggest change is to how span thread context is managed. The GRPC Context has been replaced with a built-in implementation and the static helper class has been replaced with a combination of static and instance methods. The trickiest aspect is that putting a span into the context involves calling an instance method on The rest is mostly superficial. |
# Conflicts: # money-core/src/test/scala/com/comcast/money/core/TracerSpec.scala # money-core/src/test/scala/com/comcast/money/core/formatters/FormatterPropagatorSpec.scala
Codecov Report
@@ Coverage Diff @@
## master #156 +/- ##
==========================================
+ Coverage 92.88% 93.42% +0.53%
==========================================
Files 87 89 +2
Lines 1167 1171 +4
Branches 71 79 +8
==========================================
+ Hits 1084 1094 +10
+ Misses 83 77 -6
Continue to review full report at Codecov.
|
Ooof thanks for doing this! |
Of course they decided to change the packages for everything, so the PR looks huge now. 😄 |
# Conflicts: # money-api/src/main/java/com/comcast/money/api/Span.java # money-core/src/main/scala/com/comcast/money/core/CoreSpan.scala # money-core/src/main/scala/com/comcast/money/core/CoreSpanBuilder.scala # money-core/src/main/scala/com/comcast/money/core/CoreSpanFactory.scala # money-core/src/main/scala/com/comcast/money/core/Disabled.scala # money-core/src/main/scala/com/comcast/money/core/Tracer.scala # money-core/src/main/scala/com/comcast/money/core/UnrecordedSpan.scala # money-core/src/test/scala/com/comcast/money/core/CoreSpanBuilderSpec.scala # money-core/src/test/scala/com/comcast/money/core/TracerSpec.scala
# Conflicts: # money-api/src/main/java/com/comcast/money/api/SpanInfo.java # money-core/src/main/scala/com/comcast/money/core/CoreEvent.scala # money-core/src/main/scala/com/comcast/money/core/CoreSpan.scala # money-core/src/main/scala/com/comcast/money/core/CoreSpanBuilder.scala # money-core/src/main/scala/com/comcast/money/core/CoreSpanInfo.scala # money-core/src/test/scala/com/comcast/money/core/CoreSpanBuilderSpec.scala # money-otel-handler/src/main/scala/com/comcast/money/otel/handlers/MoneyEvent.scala # money-otel-handler/src/main/scala/com/comcast/money/otel/handlers/MoneyLink.scala # money-otel-handler/src/main/scala/com/comcast/money/otel/handlers/MoneyReadableSpanData.scala # money-otel-handler/src/test/scala/com/comcast/money/otel/handlers/MoneyEventSpec.scala # money-otel-handler/src/test/scala/com/comcast/money/otel/handlers/MoneyReadableSpanDataSpec.scala
I'm taking the WIP label off. I've adopted the late-breaking changes and switched the dependencies to the release build (and removing the snapshot repository). |
Updates to using OpenTelemetry 0.10.0 libraries.
Summary of major changes:
io.opentelemetry.trace._
toio.opentelemetry.api.trace._
StatusCanonicalCode
renamed toStatusCode
Span
to add attributes, events, etc., changed to return the instance of theSpan
instead ofvoid
/Unit
Span
interface to override all of these members and use covariant returns so that they return a MoneySpan
instead of the OpenTelemetrySpan
.TextMapPropagator.Getter[T]
now has two required members and is no longer valid as a functional interface in Java or as a SAM in Scala.keys()
which returns anIterable[String]
of header names. This forces theFormatter#fromHttpHeaders
method to also be changed to accept anIterable[String]
of the header names.io.grpc.Context
has been replaced withio.opentelemetry.context.Context
Tracer#withSpan
,TracingContextUtils
Context
, e.g.Context.with(span).makeCurrent()
ContextStorage
is used to replace the underlying storage mechanism which can intercept when contexts are changed which detects the span in those contexts and updates MDC accordingly.