Class Instrumentation.TelemetryContext

java.lang.Object
com.google.adk.telemetry.Instrumentation.TelemetryContext
Enclosing class:
Instrumentation

public static final class Instrumentation.TelemetryContext extends Object
Stores all telemetry related state.
  • Constructor Details

    • TelemetryContext

      public TelemetryContext(io.opentelemetry.context.Context otelContext)
      Constructs a new TelemetryContext with 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

      public @Nullable Event functionResponseEvent()
      Retrieves the function response event associated with the execution, if available.
      Returns:
      The function response Event, or null if not set.
    • setFunctionResponseEvent

      public void setFunctionResponseEvent(@Nullable Event functionResponseEvent)
      Sets the function response event associated with the execution.
      Parameters:
      functionResponseEvent - The function response Event to store.