{"slug": "your-llm-logs-deserve-better-send-claude-code-events-to-bronto", "title": "Your LLM Logs Deserve Better — Send Claude Code Events to Bronto", "summary": "To integrate Anthropic's Claude Code monitoring with Bronto using OpenTelemetry (OTel) to gain a unified view of AI tool usage. The author details two methods: sending logs directly to Bronto via environment variables, or routing them through an OTel Collector for organizations with existing pipelines. The setup enables tracking of productivity metrics, token usage, session duration, and prompt auditing, with errors and usage patterns visible in Bronto's interface.", "body_md": "Authored by Conall Heffernan\nIn this post, I'll walk through how to integrate Anthropic's Claude Code monitoring with Bronto so you can get a clear, unified view of your AI tool usage — all in one place.\nThis project came out of our recent company AI sprint — a chance for me, as a technical support manager, to jump into an engineering sprint and brush up on my Python and Bash skills. After years of helping customers set up and troubleshoot their environments, it was exciting to get hands-on and demo my findings to the wider team over pizza and beers.\nClaude Code has a built-in monitoring feature that provides a detailed view into how your teams use AI-assisted coding — from productivity metrics to cost visibility. When paired with Bronto, this data becomes even more useful.\nHere's what you can do with the exported data:\nWhy Bronto specifically:\nClaude Code has built-in OTel support, so it can send telemetry straight to Bronto. Just set these environment variables (full details in Claude Code's docs):\nexport CLAUDE_CODE_ENABLE_TELEMETRY=1\nexport OTEL_LOGS_EXPORTER=otlp\nexport OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf\nexport OTEL_EXPORTER_OTLP_ENDPOINT=https://ingestion.eu.bronto.io\nexport OTEL_EXPORTER_OTLP_HEADERS=\"x-bronto-api-key=<api_key_here>,x-bronto-collection=AISprint,x-bronto-dataset=claude-code\"\nexport OTEL_LOGS_EXPORT_INTERVAL=2000\nexport OTEL_LOG_USER_PROMPTS=1\nWith this setup, Claude Code sends structured logs directly to Bronto — no additional infrastructure to run or maintain.\nBest for:\nIf your organisation already runs an OTel Collector, route Claude Code's logs through that same pipeline before forwarding to Bronto. This is the approach I used — I spun up a small AWS EC2 instance running the OTel collector, configured Claude Code to send logs to it, and had the collector forward those logs to Bronto.\nPoint Claude Code at your local collector:\nexport CLAUDE_CODE_ENABLE_TELEMETRY=1\nexport OTEL_LOGS_EXPORTER=otlp\nexport OTEL_EXPORTER_OTLP_PROTOCOL=grpc\nexport OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317\nexport OTEL_LOG_USER_PROMPTS=1\nPro tip: Persist these environment variables — otherwise starting a new terminal session will clear them and you'll wonder why nothing is flowing. Ask me how I know.\nCollector receiver config:\nreceivers:\notlp:\nprotocols:\ngrpc:\nendpoint: 0.0.0.0:4317 # Default OTLP gRPC port\nhttp:\nendpoint: 0.0.0.0:4318 # Default OTLP HTTP port\ncors:\nallowed_origins:\n- \"*\"\nBest for:\nTo verify everything was working, I fired up Claude Code and asked it to create a simple Python script, then made a few tweaks — spin up a basic GUI, take an input value, save it locally. While I was doing this, Claude Code was generating log events in the background, flowing through my OTel collector and straight into Bronto.\nDuring testing, Claude was hitting errors because I'd been using an old revoked API key from a previous project. While the UI showed an error, I could also see the API errors flowing into Bronto. A simple error\nquery surfaced the logs directly.\nI also created a tree map to instantly visualize which models were used across the project — making it easy to see usage patterns and identify which models were most heavily used.\nToken usage analysis — a multi group-by on $input_tokens\nand $output_tokens\nhelps identify outliers and inefficient prompts, control API spend, and uncover latency trends tied to model size or context length.\nSession duration — tracking how long each session stayed active helps identify inefficient workflows, idle connections, or hanging requests that inflate costs. It's also a signal for user engagement: shorter sessions suggest quick completions, longer ones can point to complex prompts or slow model responses.\nPrompt auditing — prompts are redacted by default. To enable them, set OTEL_LOG_USER_PROMPTS=1\n(already included in the config above).\nFrom Claude Code to Bronto, all connected through OpenTelemetry — a few environment variables, an open source agent, and you have logs and insights flowing in. Once it's set up, you get full visibility into how your AI tooling is being used, cost metrics, and what's actually happening under the hood.\nReceivers:\nreceivers:\notlp:\nprotocols:\ngrpc:\nendpoint: 0.0.0.0:4317\nhttp:\nendpoint: 0.0.0.0:4318\ncors:\nallowed_origins:\n- \"*\"\nExporters:\nexporters:\notlphttp/brontobytes:\nlogs_endpoint: \"https://ingestion.eu.bronto.io/v1/logs\"\ncompression: gzip\nheaders:\nx-bronto-api-key: \"INGESTION_API_KEY_GOES_HERE\"\ntimeout: 30s\nretry_on_failure:\nenabled: true\ninitial_interval: 5s\nmax_interval: 30s\nmax_elapsed_time: 120s\nsending_queue:\nenabled: true\nnum_consumers: 10\nqueue_size: 5000\nPipelines:\nservice:\npipelines:\nlogs:\nreceivers: [otlp]\nprocessors: [memory_limiter, resource, batch, transform]\nexporters: [otlphttp/brontobytes]", "url": "https://wpnews.pro/news/your-llm-logs-deserve-better-send-claude-code-events-to-bronto", "canonical_source": "https://dev.to/bronto_io/your-llm-logs-deserve-better-send-claude-code-events-to-bronto-1nmk", "published_at": "2026-05-21 18:47:19+00:00", "updated_at": "2026-05-21 19:04:33.658011+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "large-language-models", "data", "enterprise-software"], "entities": ["Anthropic", "Claude Code", "Bronto", "Conall Heffernan", "OpenTelemetry", "OTel"], "alternates": {"html": "https://wpnews.pro/news/your-llm-logs-deserve-better-send-claude-code-events-to-bronto", "markdown": "https://wpnews.pro/news/your-llm-logs-deserve-better-send-claude-code-events-to-bronto.md", "text": "https://wpnews.pro/news/your-llm-logs-deserve-better-send-claude-code-events-to-bronto.txt", "jsonld": "https://wpnews.pro/news/your-llm-logs-deserve-better-send-claude-code-events-to-bronto.jsonld"}}