Expand description
ratel-ai-telemetry — the ratel.* telemetry vocabulary.
See README.md and the wire contract in ../CONVENTIONS.md for design.
Enums§
- Auth
Outcome - Outcome of an MCP auth flow. Emitted as
ratel.auth.outcome;needs_authis the 401-drivenAuthNeedscase (ADR-0007auth_needs). - Origin
- Whether a
ratel.*span was a direct library call or synthesized by the agent inside its loop. Emitted as theratel.originattribute; mirrors the local traceOrigin(ADR-0007). - Search
Target - What a
ratel.searchspan was searching. Emitted asratel.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 enumNO_CONTENT(default) /SPAN_ONLY/EVENT_ONLY/SPAN_AND_EVENT. - EXECUTE_
TOOL execute_tool— thegen_ai.operation.namevalue 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 toEXECUTE_TOOLfor 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.outcome—ok/refreshed/needs_auth/failed(seeAuthOutcome).- 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. Theratel.searchspan itself carries only counts.- RATEL_
SEARCH_ TARGET ratel.search.target—toolorskill(seeSearchTarget).- RATEL_
SEARCH_ TOP_ K ratel.search.top_k— requested result count.- RATEL_
SKILL_ ID ratel.skill.id— skill loaded on theratel.skill.loadspan.- 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 theexecute_toolspan.- 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.transport—stdio/http/sse/ …- SEMCONV_
VERSION - The pinned OpenTelemetry semantic-conventions version this vocabulary tracks
(the
gen_aigroup). 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).