Getting your Mycroft pilot report
Thank you for trying Mycroft. This guide gets your first report on its way in about 20 minutes of your time, or about 45 if your Claude Code telemetry is not set up yet.
What you will do: give Mycroft one read-only credential for the metrics you already collect. What you will get: a report on your last two weeks of Claude Code spend, priced at list rates with the prompt cache counted, and the changes that would actually pay.
What Mycroft reads, and what it never touches
| Mycroft reads | Mycroft never reads |
|---|---|
| Daily token counts by model and type: input, output, cache reads, cache writes | Prompts, responses or code |
The labels Claude Code attaches: developer (user.email), request kind (query_source), effort |
Files, logs or traces |
| Your backend's own cost figure, to check ours against | Anything it could change |
The credential you create can only read metrics. You can revoke it at any time, and we encourage you to once your report arrives.
Which part is yours
- Claude Code sends telemetry to Grafana Cloud: follow G1 to G4.
- Claude Code sends telemetry to Datadog: follow D1 to D4.
- Telemetry already flowing? Skip straight to G4 or D4.
- Not sending it anywhere yet? Pick whichever backend your team already uses for monitoring. Grafana Cloud's free tier is enough for a pilot.
Settings are read when a Claude Code session starts, so after changing them, start new sessions.
Grafana Cloud
G1. Get the telemetry write details
- Sign in at grafana.com (the Cloud Portal, not your stack's own address).
- On your stack, find the OpenTelemetry tile and click Configure.
- It generates a token and shows an endpoint and a header. Keep them: this is a write credential for your developers' machines. Do not send it to us.
G2. Point Claude Code at Grafana
Add this to the env block of Claude Code's settings. For a trial, one developer's
~/.claude/settings.json is enough. For the whole team, use Claude Code's managed settings, set
centrally by your Claude Code admin.
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otlp-gateway-prod-<region>.grafana.net/otlp",
"OTEL_EXPORTER_OTLP_HEADERS": "Authorization=Basic%20<from G1>",
"OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE": "cumulative"
}
}
Do not skip the cumulative line. Claude Code sends delta counters by default, and Grafana
Cloud rejects them without any error you would notice: you would see a target_info series and
no usage at all.
G3. Check the data is arriving
Start a new Claude Code session, give it one prompt, wait a minute. In Grafana, open Explore, choose your Prometheus data source, switch the query box to Code, and run:
count by (job, __name__) ({__name__=~"claude_code_.*"})
You should see claude_code_token_usage_tokens_total and claude_code_cost_usage_USD_total. The
job column says which app sent them: claude-code from the terminal, claude-code-desktop from
the desktop app. Mycroft reads them all.
Nothing at all? Check the time range at the top of Explore covers your test prompt, and that the
session was started after the settings changed. Only target_info? The cumulative line is
missing. A report needs at least one day of data; two weeks gives the full picture. Grafana
Cloud's free tier keeps 14 days.
G4. Create Mycroft's read-only credential
- On your stack, find the Prometheus tile and click Details. Note:
- the URL, ending in
/api/prom(not/api/prom/push, which is for writing) - the Username / Instance ID, a number
- Open Security, then Access Policies, and click Create access policy:
- Display name:
mycroft-read - Realm: your one stack, not the whole organisation
- Scopes:
metrics:readand nothing else - Click Create, then Add token on the new policy. Name it
mycroft, set an expiry (90 days is sensible), and create it. The token starts withglc_and is shown once. - Send us the URL, the instance ID and the token through a password-manager share (1Password, Bitwarden Send or your company's equivalent). Please not by email, chat or ticket.
That token can read metrics from that one stack. It cannot write anything, read logs or traces, or see any other stack.
Datadog
D1. Know your site
Your site is in the address you use to open Datadog: app.datadoghq.com is us1,
app.datadoghq.eu is eu1, us3.datadoghq.com is us3, and so on. Tell us which one.
D2. Point Claude Code at Datadog
Add this to the env block of Claude Code's settings (one developer's ~/.claude/settings.json
for a trial, or Claude Code's managed settings for the team):
{
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf",
"OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://otlp.datadoghq.com/v1/metrics",
"OTEL_EXPORTER_OTLP_HEADERS": "dd-api-key=<an API key for telemetry>"
}
}
That endpoint is for us1. On another site, ask us first and we will confirm the address.
Do not add a cumulative temporality line (Grafana needs one; Datadog is the opposite).
Datadog silently drops cumulative counters, with no error anywhere.
D3. Check the data is arriving
Start a new Claude Code session, give it one prompt, and let it finish. In Datadog, open
Metrics, then Explorer, and graph claude_code.token.usage grouped by type. You should
see input, output, cacheread and cachecreation. Datadog's metric lists can take about five
minutes to catch up.
D4. Create Mycroft's credentials
- API key: Organization Settings, then API Keys. Create a new one named
mycroft, separate from the key your telemetry uses, so each can be revoked on its own. - Application key: Organization Settings, then Application Keys, then New Key. Name
it
mycroft-read. - Scope the Application key. A new key can do everything you can, so open it, choose
Edit, then Scopes, and select exactly
metrics_readandtimeseries_query. Save. Both are needed: one lists metrics, the other reads their values. - Send us your site, the API key and the Application key through a password-manager share. Please not by email, chat or ticket.
With those two scopes, the Application key can list and read metrics. It cannot see dashboards, monitors, logs or settings.
What happens next
- Your workspace. You get an invitation to your own page at app.mycroftcompute.com. Sign in with the link in the email (no password); the page shows where your setup is and has this guide. Invite a colleague there too, such as a finance partner.
- The same day we receive the credential, we run a connection check (it reads no usage) and tell you what your telemetry can and cannot support.
- Within two working days, your report appears in your workspace (and as a PDF, if you would like one to forward): where the money went by model, developer and kind of request, then the findings. Every dollar figure is the most a change could be worth, never a promised saving, and each finding ends with what your data cannot tell us.
- Then revoke the credential: Grafana, under Access Policies; Datadog, under Application Keys. If you would like a second report next month, showing what moved, we will ask for a fresh one.
- A 20-minute call to hear what you would act on, and what you would skip.
Your data: we keep the daily totals and findings only so next month can be compared, on our side and never in a code repository. Ask and we delete them, and confirm in writing.
Questions at any point: hello@mycroftcompute.com