Replies: 1 comment 4 replies
-
hi @stmlange, I think exemplars only make sense for synchronous instruments (e.g. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello Opentelemetry Comminuty!
Thank you for this great project and I'm confident what I'm about to ask is documented somewhere, but after searching for quite some time I couldn't find any additional references.
In a nutshell I have a multithreaded application that now should be traced with OpenTelemetry. So far no issue, but now metrics come into play. The application may launch sub-processes where I want the application should add metrics to the sub-process. Each sub-process get's it's own Trace. However I'm now a bit stuck how this metric <-> trace relation ship is achieved concretely.
The documentation mentions [exemplars|https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#exemplars], but when using the [DoubleCounterExample|https://github.com/open-telemetry/opentelemetry-java-examples/blob/main/metrics/src/main/java/io/opentelemetry/example/metrics/DoubleCounterExample.java] with a OpenTelemetryRule for testing I can't see the connection made between the metric and the trace.
I'm close to just pass on a
span_id
andtrace_id
as additional attribute to themeter.buildWithCallback
, but this really feels wrong now.Could someone perhaps point me, or provide me concrete examples on how this metric <-> trace relation ship is achieved? I would like to also have automated tests using the OpenTelemetryRule that ensure that relationship works (e.g. my code is using OTEL correctly).
Thanks for any insights!
Beta Was this translation helpful? Give feedback.
All reactions