Expand description
OpenTelemetry helpers for provider-authored GenAI instrumentation. OpenTelemetry helpers for provider-authored GenAI instrumentation.
Gestalt injects standard OTEL_* environment variables into provider
processes from the host telemetry configuration. This module records GenAI
semantic-convention spans and metrics through the process-global
OpenTelemetry API configured by the provider runtime.
Structs§
- Agent
Invocation Options - Options for recording provider-owned agent turn execution.
- GenAI
Operation - Records a GenAI span plus operation duration and token usage metrics.
- Model
Operation Options - Options for recording an upstream model SDK call.
- Request
Options - Common GenAI request options that are useful as span attributes.
- Token
Usage - GenAI token usage recorded on spans and token usage metrics.
- Tool
Execution Options - Options for recording provider-owned tool execution.
Constants§
- GENAI_
OPERATION_ CHAT - GenAI operation name for chat/model calls.
- GENAI_
OPERATION_ EXECUTE_ TOOL - GenAI operation name for tool executions.
- GENAI_
OPERATION_ INVOKE_ AGENT - GenAI operation name for agent invocations.
- GENAI_
PROVIDER_ NAME - Default GenAI provider name used for Gestalt-owned agent and tool work.
- GENAI_
TOOL_ TYPE_ DATASTORE - GenAI tool type for datastore-backed tools.
- GENAI_
TOOL_ TYPE_ EXTENSION - GenAI tool type for extension/plugin-backed tools.
- TELEMETRY_
INSTRUMENTATION_ NAME - OpenTelemetry instrumentation scope used by the Gestalt SDK.
Functions§
- agent_
invocation - Starts a GenAI internal span for provider-owned agent turn execution.
- model_
operation - Starts a GenAI client span for an upstream model SDK call.
- tool_
execution - Starts a GenAI internal span for provider-owned tool execution.