Skip to main content

Span attribute reference

Every attribute the plugin may set, grouped by span type. See Attribute conventions for the narrative version of the dual-convention mapping.

Attributes marked optional are only set when the underlying data is available.

Resource (on every span)

AttributeSource
service.nameOTEL_PROJECT_NAME / project_name (fallback: hermes-agent)
service.versionhermes-otel plugin version
otel.scope.namehermes-otel
openinference.project.nameSame as service.name
telemetry.sdk.*Set by OTel SDK
any resource_attributes.*From config.yaml
any global_tags.*From config.yaml (overridden by resource_attributes on key conflict)

session.* / cron

Set at start:

AttributeTypeMeaning
hermes.session.kindstringcli · telegram · discord · cron · ...
hermes.session.idstringHermes session ID
session.idstringStandard OTel alias
user.idstringHermes user ID (optional)

Set at end (turn summary):

AttributeTypeMeaning
hermes.turn.tool_countintDistinct tool names invoked
hermes.turn.toolsstringSorted CSV of distinct tool names (≤500 chars)
hermes.turn.tool_targetsstring|-joined distinct file paths/URLs
hermes.turn.tool_commandsstring|-joined distinct shell commands
hermes.turn.tool_outcomesstringSorted CSV of distinct outcome statuses
hermes.turn.skill_countintDistinct skills inferred
hermes.turn.skillsstringSorted CSV of distinct skill names
hermes.turn.api_call_countintpre_api_request hooks fired
hermes.turn.final_statusstringcompleted · interrupted · incomplete · timed_out

Empty/zero aggregators are omitted.

llm.*

Span kind: LLM (OpenInference).

AttributeConventionTypeMeaning
llm.model_nameOpenInferencestringModel name
llm.providerOpenInferencestringProvider (anthropic, openai, ...)
gen_ai.request.modelgen_aistringModel name (Langfuse)
gen_ai.systemgen_aistringProvider (Langfuse)
input.valueOpenInferencestringUser message OR full conversation JSON
input.mime_typeOpenInferencestringtext/plain OR application/json
output.valueOpenInferencestringFinal assistant response
output.mime_typeOpenInferencestringtext/plain
gen_ai.content.promptgen_aistringUser message
gen_ai.content.completiongen_aistringAssistant response
hermes.conversation.message_counthermesintWhen conversation capture is on (optional)

api.*

Span kind: LLM (OpenInference).

AttributeConventionTypeMeaning
gen_ai.request.modelgen_aistringModel name
llm.model_nameOpenInferencestringModel name
llm.providerOpenInferencestringProvider
llm.token_count.promptOpenInferenceintPrompt tokens
llm.token_count.completionOpenInferenceintCompletion tokens
llm.token_count.totalOpenInferenceintSum
llm.token_count.cache_readOpenInferenceintCache read (optional)
llm.token_count.cache_writeOpenInferenceintCache write (optional)
gen_ai.usage.input_tokensgen_aiintPrompt tokens
gen_ai.usage.output_tokensgen_aiintCompletion tokens
gen_ai.usage.cache_read_input_tokensgen_aiintCache read (optional)
gen_ai.usage.cache_creation_input_tokensgen_aiintCache write (optional)
llm.invocation_parametersOpenInferencestring (JSON)Request params
gen_ai.response.finish_reasongen_aistringstop, tool_use, length, etc.
http.duration_mshermesintWall-clock HTTP duration

tool.*

Span kind: TOOL (OpenInference).

AttributeConventionTypeMeaning
tool.nameOpenInferencestringTool name
input.valueOpenInferencestringTool args (JSON)
output.valueOpenInferencestringTool result
hermes.tool.targethermesstringInferred file path / URL (optional)
hermes.tool.commandhermesstringInferred shell command (optional)
hermes.tool.outcomehermesstringcompleted · error · timeout · blocked
hermes.skill.namehermesstringInferred skill name (optional)

Metrics (separate from spans)

Emitted via PeriodicExportingMetricReader on backends that support OTLP metrics:

MetricTypeUnitLabels
hermes.tokens.promptCountertokensmodel, provider
hermes.tokens.completionCountertokensmodel, provider
hermes.tokens.totalCountertokensmodel, provider
hermes.tokens.cache_readCountertokensmodel, provider
hermes.tokens.cache_writeCountertokensmodel, provider
hermes.tool.callsCountercounttool_name, outcome
hermes.tool.durationHistogrammstool_name, outcome
hermes.api.durationHistogrammsmodel, provider, finish_reason
hermes.skill.inferredCountercountskill_name, source
hermes.sessionsCountercountkind, final_status

Label cardinality is bounded by normalised values (outcomes, finish reasons) and small dimension sets (model, tool name). No user IDs or other high-cardinality labels.