[token-consumption] Daily AIC Consumption Report - 2026-08-26

Daily AIC Consumption Report (Sentry + Grafana OTel) · issue · open

Filter2mode:review mode:live
All recorded Export JSON
github-actions[bot]

published Aug 26, 2026, 12:05 PM · updated Aug 26, 2026, 12:05 PM

Executive Summary

⚠️ Configuration Gap Detected: The Daily AIC Consumption Report workflow cannot access telemetry backends. Both Sentry and Grafana MCP servers are unavailable due to missing repository secrets, preventing AI Credits (AIC) consumption analysis.

While OTLP telemetry is being exported to Sentry (https://o205451.ingest.us.sentry.io/api/4511347087179777/integration/otlp), the workflow cannot query this data because the required authentication credentials are not configured.

Key Metrics

Metric Value
Events analyzed 0 (no backend access)
Events with AIC data 0 (no backend access)
Events with AIC data (Sentry) unavailable
Events with AIC data (Grafana) unavailable
Total AIC unavailable
Unique workflows unavailable
Avg AIC/event unavailable
P95 AIC/event unavailable

Observability Backend Status

Sentry Status

  • OTLP Export: ✅ Configured (OTEL_EXPORTER_OTLP_ENDPOINT is set)
  • MCP Server: ❌ Not running (missing SENTRY_ACCESS_TOKEN secret)
  • Query Capability: ❌ Unavailable — cannot call find_organizations, find_projects, search_events, or list_events

Expected MCP Configuration (from .github/workflows/shared/mcp/sentry.md):

mcp-servers:
  sentry:
    command: "npx"
    args: ["@sentry/mcp-server@0.33.0"]
    env:
      SENTRY_ACCESS_TOKEN: ${{ secrets.SENTRY_ACCESS_TOKEN }}  # ❌ MISSING

Required Secret: SENTRY_ACCESS_TOKEN

  • Scope requirements: org:read, project:read, event:write, team:read
  • Creation: User Auth Token in Sentry organization settings

Grafana Status

  • MCP Server: ❌ Not running (missing GRAFANA_URL and GRAFANA_SERVICE_ACCOUNT_TOKEN secrets)
  • Query Capability: ❌ Unavailable — cannot call list_datasources, tempo_traceql-search, or tempo_get-trace

Expected MCP Configuration (from .github/workflows/shared/mcp/grafana.md):

mcp-servers:
  grafana:
    container: "grafana/mcp-grafana:1.1.0-alpine"
    env:
      GRAFANA_URL: "${{ secrets.GRAFANA_URL }}"  # ❌ MISSING
      GRAFANA_SERVICE_ACCOUNT_TOKEN: "${{ secrets.GRAFANA_SERVICE_ACCOUNT_TOKEN }}"  # ❌ MISSING

Required Secrets:

  • GRAFANA_URL — base URL of Grafana instance (e.g., (grafana.example.com/redacted))
  • GRAFANA_SERVICE_ACCOUNT_TOKEN — service account token with Tempo/datasource read permissions
Data Quality and Gaps

Current Configuration Evidence

Workflow: daily-token-consumption-report.md

  • Run ID: 32966107336
  • OTLP Endpoint: https://o205451.ingest.us.sentry.io/api/4511347087179777/integration/otlp
  • Service Name: gh-aw.daily-token-consumption-report
  • Trace ID: 67dc513ded411534e948a0bed80edc73

MCP Servers Detected:

  • github MCP server (configured)
  • safeoutputs MCP server (configured)
  • sentry MCP server (not found in .goose/mcp.json)
  • grafana MCP server (not found in .goose/mcp.json)

Workflow Import Chain

The workflow imports both telemetry backends:

imports:
  - shared/mcp/sentry.md
  - shared/mcp/grafana.md

However, MCP servers are only instantiated when their required environment variables are present. When secrets are missing, the MCP server registration is silently skipped.

Impact on Reporting

  • Zero telemetry events analyzed: Cannot query spans from Sentry or Grafana
  • No AIC consumption data: Cannot aggregate gh-aw.aic attributes
  • No workflow-level metrics: Cannot identify top consumers or anomalies
  • No trend analysis: Cannot compare with historical data

Grafana AIC Findings

Grafana MCP server unavailable — cannot assess whether AIC attributes are queryable in Tempo. The workflow cannot proceed to:

  1. Call list_datasources to discover Tempo datasource
  2. Call tempo_get-attribute-names to verify available attributes
  3. Query traces with tempo_traceql-search scoped to {.service.name =~ "gh-aw.*"}
  4. Verify numeric AIC fields on spans with tempo_get-trace

Unknown: Whether Tempo traces include queryable numeric gh-aw.aic attributes. This must be verified after Grafana access is configured.

Recommendations

1. Configure Required Repository Secrets

Priority: High — these secrets are mandatory for telemetry analysis.

Add the following secrets to repository settings (Settings → Secrets and variables → Actions → Repository secrets):

Secret Name Description Required By
SENTRY_ACCESS_TOKEN User Auth Token with org:read, project:read, event:write, team:read scopes Sentry MCP server
GRAFANA_URL Base URL of Grafana instance (e.g., (grafana.example.com/redacted)) Grafana MCP server
GRAFANA_SERVICE_ACCOUNT_TOKEN Service account token with Tempo/datasource read permissions Grafana MCP server

Sentry Token Creation:

  1. Navigate to Sentry organization settings
  2. Go to Developer Settings → User Auth Tokens
  3. Create a new token with the required scopes listed above
  4. Add token value as SENTRY_ACCESS_TOKEN in GitHub repository secrets

Grafana Token Creation:

  1. Navigate to Grafana instance
  2. Go to Administration → Service Accounts
  3. Create a new service account with Viewer role and Tempo datasource read permissions
  4. Generate a service account token
  5. Add token value as GRAFANA_SERVICE_ACCOUNT_TOKEN in GitHub repository secrets
  6. Add Grafana base URL as GRAFANA_URL in GitHub repository secrets

2. Verify MCP Server Startup in Workflow Logs

After configuring secrets, re-run this workflow and verify:

  • Setup phase logs should show MCP server registration:
    • Registered MCP server: sentry
    • Registered MCP server: grafana
  • Agent logs should show successful MCP tool calls:
    • Sentry: find_organizations, find_projects, list_events
    • Grafana: list_datasources, tempo_traceql-search

If MCP servers still don't appear, check for:

  • Secret name typos (must match exactly: SENTRY_ACCESS_TOKEN, GRAFANA_URL, GRAFANA_SERVICE_ACCOUNT_TOKEN)
  • Secret scope (must be Actions scope, not Codespaces or Dependabot)
  • Workflow permissions (workflow must have access to secrets)

3. Validate Tempo AIC Attribute Schema

Priority: Medium — once Grafana access is configured, verify AIC instrumentation.

After Grafana MCP server is running, confirm:

  1. Attribute presence: Call tempo_get-attribute-names and verify gh-aw.aic is in the list
  2. Attribute type: Query sample traces and confirm gh-aw.aic is stored as numeric (not string)
  3. Attribute indexing: Verify Tempo datasource is configured to index gh-aw.aic for efficient querying
  4. OTLP export: Confirm spans exported to Sentry OTLP endpoint include numeric gh-aw.aic attributes

If gh-aw.aic is missing or typed as string:

  • Check OTLP export configuration in actions/setup/js/send_otlp_span.cjs
  • Verify workflow conclusion spans emit gh-aw.aic as a numeric attribute
  • Update Tempo datasource configuration to index the attribute if needed

4. Consider Alternative Telemetry Query Methods

Priority: Low — fallback options if MCP access cannot be configured.

If configuring Sentry/Grafana MCP servers is not feasible:

  • Direct API queries: Use curl or GitHub Actions native HTTP requests to query Sentry/Grafana APIs directly
  • Local artifact collection: Export OTLP spans to local JSON files during workflow runs, then aggregate offline
  • GitHub Actions artifacts: Upload telemetry data as workflow artifacts, then query via GitHub API

However, these approaches are less maintainable and lack the structured tooling provided by MCP servers.

References

  • Current Workflow Run: #32966107336
  • Sentry OTLP Endpoint: https://o205451.ingest.us.sentry.io/api/4511347087179777/integration/otlp
  • Workflow Source: .github/workflows/daily-token-consumption-report.md
  • MCP Config: .goose/mcp.json (runtime-generated)

Next Run: After configuring the required secrets, this workflow should successfully query telemetry backends and produce a complete AIC consumption report with workflow-level metrics and top consumers.

Generated by 📊 Daily AIC Consumption Report (Sentry + Grafana OTel) · goose · sonnet45 · 65.2 AIC · ⊞ 6.7K ·

  • expires on Aug 27, 2026, 4:05 AM UTC-08:00