Class Instrumentation.TelemetryContext
java.lang.Object
com.google.adk.telemetry.Instrumentation.TelemetryContext
- Enclosing class:
Instrumentation
Stores all telemetry related state.
-
Constructor Summary
ConstructorsConstructorDescriptionTelemetryContext(io.opentelemetry.context.Context otelContext) Constructs a newTelemetryContextwith the given OpenTelemetry context. -
Method Summary
Modifier and TypeMethodDescription@Nullable EventRetrieves the function response event associated with the execution, if available.io.opentelemetry.context.ContextRetrieves the stored OpenTelemetry context.voidsetFunctionResponseEvent(@Nullable Event functionResponseEvent) Sets the function response event associated with the execution.
-
Constructor Details
-
TelemetryContext
public TelemetryContext(io.opentelemetry.context.Context otelContext) Constructs a newTelemetryContextwith the given OpenTelemetry context.- Parameters:
otelContext- The OpenTelemetry context to store.
-
-
Method Details
-
otelContext
public io.opentelemetry.context.Context otelContext()Retrieves the stored OpenTelemetry context.- Returns:
- The OpenTelemetry
Context.
-
functionResponseEvent
-
setFunctionResponseEvent
-