Open ikhoon opened 1 year ago
A couple of observations while working on the client-side integration while working on https://github.com/line/armeria/pull/4883
Basically, our current brave
module implementation provides the following:
RequestContext
via RequestContextCurrentTraceContext.I think 2,3 are relatively easy to handle, but I think context propagation isn't possible to handle with a micrometer-tracing
-only solution. (I'll also try opening an issue on micrometer-tracing
side, but honestly the implementations are so different between brave
and otel
that I don't have a good idea on what they could do either)
Basically, I think realistically we'll also have to add integration for opentelemetry
as well before proceeding.
RequestContextCurrentTraceContext
equivalent of the brave
module for opentelemetry
like the following: https://github.com/line/armeria/blob/adcaca04bda7a42e1e6c2f401669dc4da8af4edf/it/micrometer-tracing/bridge-otel/src/test/java/com/linecorp/armeria/micrometer/tracing/otel/ArmeriaOtelContextStorage.javabrave
integration with micrometer-tracing
, they'll need to:
micrometer-tracing
, micrometer-tracing-bridge-brave
, armeria-micrometer-tracing
RequestContextCurrentTraceContext
, they also have to add the armeria-brave
dependency.opentelemetry
integration with micrometer-tracing
, they need to go through a similar process:
micrometer-tracing
, micrometer-tracing-bridge-otel
, armeria-micrometer-tracing
armeria-opentelemetry
dependency.The downside of this approach is that the solution isn't generic (since in addition to micrometer-tracing
, we still need to keep implementing CurrentTraceContext
s for each implementation).
There are also some issues for each integration. For instance, the CurrentTraceContext
passed into each tracer isn't actually used, which may cause some confusion for users:
Let me also talk to the micrometer-tracing
people to make sure I'm not misusing any APIs or concepts, and check if there's a better way to handle this issue.
Started discussions on the behavior of Tracer#currentTraceContext
https://github.com/micrometer-metrics/tracing/issues/268
Let me think more if there's a generic way to provide RequestContext
based trace propagation before raising an issue as well 😅
/cc @trask @jkwatson
@jkwatson and I would of course recommend instrumenting with OpenTelemetry API
Using the OpenTelemetry API directly there weren't any issues I could find 😄 (actually I found the OpenTelemetry API very well defined and the integration experience very smooth when working on the POC)
Micrometer Tracing is a facade library for popular tracer libraries. Armeria pursues an opinionated framework. If we support Micrometer Tracing, users are able to use their favorite tracing library easily.