Skip to main content

Crate ratel_ai_telemetry

Crate ratel_ai_telemetry 

Source
Expand description

ratel-ai-telemetry — the ratel.* telemetry vocabulary.

See README.md and the wire contract in ../CONVENTIONS.md for design.

Enums§

AuthOutcome
Outcome of an MCP auth flow. Emitted as ratel.auth.outcome; needs_auth is the 401-driven AuthNeeds case (ADR-0007 auth_needs).
Origin
Whether a ratel.* span was a direct library call or synthesized by the agent inside its loop. Emitted as the ratel.origin attribute; mirrors the local trace Origin (ADR-0007).
SearchTarget
What a ratel.search span was searching. Emitted as ratel.search.target; folds capability-tool search and skill search into one span shape.

Constants§

CAPTURE_CONTENT_ENV
The ecosystem instrumentation env var gating message/tool content capture. Default off; the standard OTel gen_ai gate rather than a Ratel-invented flag (CONVENTIONS.md § Capture gating). This crate is constants-only — the TS/Python init() helpers read it. Values: legacy boolean, or the enum NO_CONTENT (default) / SPAN_ONLY / EVENT_ONLY / SPAN_AND_EVENT.
EXECUTE_TOOL
execute_tool — the gen_ai.operation.name value for a tool invocation.
GEN_AI_INFERENCE_DETAILS
gen_ai.client.inference.operation.details — the event that carries message text and tool-call content (never span attributes). Borrowed from gen_ai (Tier 1).
GEN_AI_OPERATION_NAME
gen_ai.operation.name — set to EXECUTE_TOOL for a tool invocation.
GEN_AI_TOOL_CALL_ARGUMENTS
gen_ai.tool.call.arguments — tool arguments (Opt-In content, gated).
GEN_AI_TOOL_CALL_ID
gen_ai.tool.call.id — tool call id, when available.
GEN_AI_TOOL_CALL_RESULT
gen_ai.tool.call.result — tool result (Opt-In content, gated).
GEN_AI_TOOL_NAME
gen_ai.tool.name — the capability tool id.
RATEL_AUTH_FLOW
ratel.auth.flow — MCP auth flow.
RATEL_AUTH_OUTCOME
ratel.auth.outcomeok / refreshed / needs_auth / failed (see AuthOutcome).
RATEL_ORIGIN
ratel.origin — direct library call vs agent-synthesized (shared attribute).
RATEL_SEARCH
ratel.search — capability search (unifies tool-search and skill-search).
RATEL_SEARCH_HIT_COUNT
ratel.search.hit_count — results returned.
RATEL_SEARCH_QUERY
ratel.search.query — the search text (content, gated like message content).
RATEL_SEARCH_RESULTS
ratel.search.results — Opt-In event carrying hit ids + scores + per-stage BM25 timing; gated like content. The ratel.search span itself carries only counts.
RATEL_SEARCH_TARGET
ratel.search.targettool or skill (see SearchTarget).
RATEL_SEARCH_TOP_K
ratel.search.top_k — requested result count.
RATEL_SKILL_ID
ratel.skill.id — skill loaded on the ratel.skill.load span.
RATEL_SKILL_LOAD
ratel.skill.load — skill content load (get_skill_content).
RATEL_TOOL_ARGS_SIZE_BYTES
ratel.tool.args_size_bytes — argument payload size on the execute_tool span.
RATEL_UPSTREAM_REGISTER
ratel.upstream.register — upstream-MCP ingest.
RATEL_UPSTREAM_SERVER
ratel.upstream.server — upstream MCP server backing a tool / auth flow.
RATEL_UPSTREAM_TOOL_COUNT
ratel.upstream.tool_count — tools ingested on register.
RATEL_UPSTREAM_TRANSPORT
ratel.upstream.transportstdio / http / sse / …
SEMCONV_VERSION
The pinned OpenTelemetry semantic-conventions version this vocabulary tracks (the gen_ai group). The pin is the contract; consumers read against this exact version, never “latest”. Bumping it is a reviewed change with its own PR and, if the shape changed, a superseding ADR (CONVENTIONS.md § The pin).