-
Hey everyone 👋
I had hard time understanding this README section, specifically whether my application does or doesn't qualify as instrumented or instrumentation library. It is just an app that has the following dependencies ( "io.opentelemetry" % "opentelemetry-api" % otelVersion,
"io.opentelemetry" % "opentelemetry-extension-annotations" % otelVersion,
"io.opentelemetry" % "opentelemetry-sdk" % otelVersion,
"io.opentelemetry" % "opentelemetry-exporter-otlp" % otelVersion,
"io.opentelemetry" % "opentelemetry-sdk-extension-autoconfigure" % otelInstrumentationVersion,
"io.opentelemetry" % "opentelemetry-api-metrics" % otelInstrumentationVersion,
"io.opentelemetry" % "opentelemetry-sdk-metrics" % otelInstrumentationVersion,
"io.opentelemetry" % "opentelemetry-exporter-otlp-metrics" % otelInstrumentationVersion,
"io.grpc" % "grpc-netty-shaded" % "1.41.0" I have a service name (set in a I would love to understand where and when should I create a Tracer (or Tracers). Is it once per App? Is it for every high level logical path (business specific action), i.e. per same chain of Spans? In SdkTraceProvider they seem to be maintained in memory so I would love to get a better understanding of how/where should I create and manage Traces. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is no hard-and-fast rule to these questions. A Tracer is simply a named (and optionally versioned) shim on top of the TracerProvider. The InstrumentationLibraryInfo (name + version + schema) associated with the tracer will be attached to Spans that are generated by the SDK (whether and how that information is exported is up to the individual exporter implementation). If you wish to track the source of your spans at a very granular level, then you can certainly create as many Tracers as you desire, but that is completely up to you. |
Beta Was this translation helpful? Give feedback.
There is no hard-and-fast rule to these questions. A Tracer is simply a named (and optionally versioned) shim on top of the TracerProvider. The InstrumentationLibraryInfo (name + version + schema) associated with the tracer will be attached to Spans that are generated by the SDK (whether and how that information is exported is up to the individual exporter implementation). If you wish to track the source of your spans at a very granular level, then you can certainly create as many Tracers as you desire, but that is completely up to you.