Class Context
java.lang.Object
io.confluent.telemetry.Context
Context for metrics collectors.
Encapsulates metadata such as the OpenTelemetry
Resource and InstrumentationScope-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.proto.common.v1.InstrumentationScopeGet theInstrumentationScopein this Context.io.opentelemetry.proto.resource.v1.ResourceGet theResourcein this Context.boolean
-
Constructor Details
-
Context
-
Context
-
Context
public Context(io.opentelemetry.proto.resource.v1.Resource resource, String domain, boolean debugEnabled)
-
-
Method Details
-
getResource
public io.opentelemetry.proto.resource.v1.Resource getResource()Get theResourcein this Context. TheResourcerepresents the entity for which telemetry is being collected.The
buildMetricsData()andbuildRequest()methods can be used to construct OTLP messages with theResourceandInstrumentationScopefrom this context. -
getInstrumentationScope
public io.opentelemetry.proto.common.v1.InstrumentationScope getInstrumentationScope()Get theInstrumentationScopein this Context. TheInstrumentationScoperepresents the library or framework that is instrumenting the telemetry data.The
buildMetricsData()andbuildRequest()methods can be used to construct OTLP messages with theResourceandInstrumentationScopefrom this context. -
isDebugEnabled
public boolean isDebugEnabled() -
getDomain
-