All notable changes to @ultrathink-solutions/openclaw-logfire will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 - 2026-02-16
llm_inputandllm_outputhook handlers for per-LLM-call observability- Individual
gen_ai.chatchild spans for each LLM invocation, correlated byrunId - Token usage metrics now populated with real data from
llm_outputhook (recordTokenUsage()was previously stubbed but never called) - Model name tracking (
gen_ai.request.model,gen_ai.response.model) on LLM and agent spans - Cache token tracking (
openclaw.usage.cache_read_tokens,openclaw.usage.cache_write_tokens) on LLM spans - Cumulative token counts set on root
invoke_agentspan at session end - Inference detail events (
gen_ai.client.inference.operation.details) now emitted whencaptureInferenceEventsis enabled
- OpenTelemetry SDK upgraded from 1.x to 2.x — stable SDK 1.30→2.5, experimental 0.57→0.212. Only breaking change:
Resourceclass constructor replaced withresourceFromAttributes(). Dependency ranges updated; consumers using OTEL 2.x will no longer see peer dep warnings. - Token usage metrics include actual model names instead of empty strings
- Operation duration metrics include model name and provider from LLM hooks
- Provider name on agent span is updated from
llm_inputwhen configproviderNameis unset - Zero-value token counts (e.g. 0 output tokens) are now correctly accumulated — fixed truthy checks that silently dropped zeros
- LLM span closure wrapped in
try/finallyto prevent span leaks on exceptions - Prompt content capture now applies
prepareForCapture()redaction and truncation (consistent with tool args) isRecordruntime guard added tollm_input/llm_outputhook registrations (consistent with all other hooks)- Orphaned span cleanup uses LIFO order (children before parent) for valid trace trees
- Hook handler unit tests added — 113 tests across 11 files, coverage boosted from 28% to 67%
after_tool_callhook not yet implemented — OpenClaw SDK passessessionKey: undefinedat all call sites, making span store lookup impossible. Per-tool error status is not available on tool spans. Tool errors are still captured at the agent level via theagent_endhook. Pending upstream fix.
0.2.0 - 2026-02-16
- Breaking: Align all hook handlers with the OpenClaw plugin SDK
(event, ctx)two-argument contract. Previous version only captured the first argument and expected context data nested inside the event, which causedTypeError: Cannot read properties of undefinedon every hook invocation. - Correct event property names:
event.toolName(wasevent.tool?.name),event.params(wasevent.tool?.args),event.message(wasevent.result)
- Token usage recording in
agent_end— token data is not available in theagent_endevent payload (restored in 0.3.0 viallm_outputhook) - W3C trace context extraction from webhook headers in
message_received— raw HTTP headers are not exposed in themessage_receivedevent metadata - Per-tool error recording in
tool_result_persist— error details are not available in that hook's event payload
0.1.2 - 2026-02-16
- Read plugin config from
api.pluginConfiginstead ofapi.config— OpenClaw passes the full application config asapi.configand the plugin-specific config asapi.pluginConfig. Reading fromapi.configcaused all settings (environment, providerName, etc.) to silently fall through to defaults.
0.1.1 - 2026-02-16
- Removed JSON Schema
$schemadeclaration (draft 2020-12) fromopenclaw.plugin.json— OpenClaw's bundled Ajv only supports draft-07 and crashes on any CLI command when an incompatible$schemais present - Changed plugin manifest
idfrom"logfire"to"openclaw-logfire"— OpenClaw resolves plugin config by manifestid, and the mismatch caused config entries to silently not pass through to the plugin
- Breaking: Config entry key must now be
"openclaw-logfire"(was"logfire") to match the corrected manifestid
SKILL.mdfor ClawHub registry listing
0.1.0 - 2026-02-15
- Initial release
- Full agent lifecycle tracing with OTEL GenAI semantic conventions
invoke_agentroot spans with agent name, session key, workspace, and channel attributionexecute_toolchild spans with tool arguments, duration, and result size- Error tracing with OTEL exception events (type, message, stack trace)
- Token usage metrics (
gen_ai.client.token.usagehistogram) - Operation duration metrics (
gen_ai.client.operation.durationhistogram) - Pydantic Logfire OTLP HTTP export (US and EU regions)
- Clickable Logfire trace URLs in agent logs
- Secret redaction for API keys, platform tokens, JWTs, and credentials
- W3C traceparent injection into HTTP commands for distributed tracing
- W3C trace context extraction from inbound webhook headers
- Configurable trace depth (tool input/output capture, message content, inference events)
- Batch and simple span processor modes
- Zero-config quickstart (just set
LOGFIRE_TOKEN)