Expand description
Full-content OpenTelemetry export to the tenant collector.
TenantContentSink turns every journaled step into an OpenTelemetry
span that follows the GenAI semantic conventions
(https://github.com/open-telemetry/semantic-conventions-genai):
- a chat call (request record plus terminal response record, joined by
their response-attempt id) becomes one
chat {model}span of kindCLIENTwithgen_ai.input.messages,gen_ai.output.messages, token usage, finish reasons, andgen_ai.conversation.id(the session); - a tool authorization becomes an
execute_tool {tool}span with the tool name, call id, and arguments, plus the gateway’s verdict; - a tool completion becomes an
execute_tool.resultspan carryinggen_ai.tool.call.result; - every other audit event becomes an
agentvisor.{class}span carrying the redacted event.
Every content field passes through the redaction engine (the built-in
patterns plus the configured redaction_patterns and redaction_paths)
before it becomes an attribute, even when journal redaction is off. The
sink exports through its own tracer provider, whose only exporter is the
tenant endpoint, so the operator’s collector never receives content.
Structs§
- Tenant
Content Sink - Content sink exporting GenAI spans to the tenant collector.
Constants§
- MAX_
ATTRIBUTE_ BYTES - Longest content attribute exported; longer values are truncated with a marker that states how many bytes were cut.