v1.0.4
Token Metrics Now Tracked for MCP Automatic Tool Selection: Fixed missing token tracking in steps with mcps (automatic tool selection). Previously, token usage was only recorded for simple LLM-only steps, causing MCP workflows to show zero tokens in observability dashboards. Now all LLM calls properly record llm.tokens.input, llm.tokens.output, and llm.tokens.total metrics regardless of whether tools are being used.
Telemetry Flush Now Works with Auto-Configured SDK: Fixed telemetry.flush() to properly flush metrics when using auto-configured SDK via endpoint parameter. Now directly calls metricReader.forceFlush() instead of trying to use non-existent SDK.forceFlush() method. Metrics are now immediately sent to the collector instead of waiting for the 5-second periodic export.
Comprehensive Token Tracking: All LLM providers (OpenAI, Anthropic, Mistral, Llama, Bedrock, Vertex Studio, Azure) now track input/output token usage. Metrics include volcano.llm.tokens.input, volcano.llm.tokens.output, volcano.llm.tokens.total with provider, model, and agent_name labels. Enables answering "Which agent consumes most tokens?" and "Which provider is most cost-effective?"
Agent Relationship Metrics: Track parent-child agent relationships with volcano.agent.subagent_calls and volcano.agent.executions. Enables answering "What agent is used most?" and "What's the parent-child usage pattern?"
Comprehensive Grafana Dashboard: 23-panel dashboard (grafana-volcano-comprehensive.json) with agent analytics, token economics, performance metrics, and error tracking. Answers questions like "Which agent uses most tokens?", "What are the parent-child relationships?", and "Which provider is fastest?"
Comprehensive Telemetry Test Suite: New telemetry.comprehensive.test.ts with 24 tests validating all telemetry scenarios including named/anonymous agents, token tracking, LLM metrics, step metrics, sub-agents, multi-provider workflows, error handling, and span creation.