Skip to content

[token-consumption] Daily AIC Consumption Report - 2026-08-14 - BLOCKED: MCP Servers Not Initialized #52709

Description

@github-actions

Executive Summary

BLOCKED: The Daily AIC Consumption Report workflow cannot execute because required MCP servers (Sentry and Grafana) are not initialized in the runtime environment.

Despite correct workflow configuration declaring MCP server imports, the runtime MCP configuration (.goose/mcp.json) only contains github and safeoutputs servers. This prevents querying telemetry data from both Sentry (spans dataset) and Grafana/Tempo (traces), making AIC consumption analysis impossible.

Root Cause

The workflow source file (.github/workflows/daily-token-consumption-report.md) correctly imports:

  • shared/mcp/sentry.md
  • shared/mcp/grafana.md

However, these MCP servers require secrets that are not configured in the repository:

  • SENTRY_ACCESS_TOKEN (required by Sentry MCP server)
  • GRAFANA_URL (required by Grafana MCP server)
  • GRAFANA_SERVICE_ACCOUNT_TOKEN (required by Grafana MCP server)

When these secrets are missing, the compiler/runtime silently excludes the MCP servers from the final configuration instead of failing with an explicit error.

Evidence

1. Runtime MCP Configuration

{
  "mcpServers": {
    "github": { "type": "streamable_http", "url": "(localhost/redacted) },
    "safeoutputs": { "type": "streamable_http", "url": "(localhost/redacted) }
  }
}

Expected: sentry and grafana MCP servers should also be present.

2. OTLP Configuration Present

OTEL_EXPORTER_OTLP_ENDPOINT=https://o205451.ingest.us.sentry.io/api/4511347087179777/integration/otlp
GH_AW_OTLP_ENDPOINTS=[
  {"url":"https://o205451.ingest.us.sentry.io/api/4511347087179777/integration/otlp",...},
  {"url":"https://otlp-gateway-prod-eu-west-2.grafana.net/otlp",...}
]

This confirms that spans are being exported to both Sentry and Grafana, but the query path (MCP servers) is not configured.

3. Lock File Manifest

The compiled .lock.yml file references these secret names in the manifest but does not include the MCP server definitions:

"secrets":["...","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT",...]

Note: These are OTLP export secrets (for span emission), not the MCP server query secrets (SENTRY_ACCESS_TOKEN, GRAFANA_URL, GRAFANA_SERVICE_ACCOUNT_TOKEN).

Impact

Immediate Impact

  1. No AIC visibility: Cannot query aggregate AIC consumption across workflows
  2. No workflow-level attribution: Cannot identify top AIC consumers
  3. No anomaly detection: Cannot spot unusual usage patterns
  4. No cost optimization: Cannot generate data-driven recommendations

Long-term Impact

  • Daily AIC reporting workflow runs but produces no actionable insights
  • Wasted CI/CD minutes on blocked workflows
  • Missing cost control feedback loop for agentic workflows

Recommendations

Option 1: Configure Repository Secrets (Preferred)

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

  1. SENTRY_ACCESS_TOKEN

  2. GRAFANA_URL

    • Format: https://your-grafana-instance.grafana.net (or your self-hosted URL)
  3. GRAFANA_SERVICE_ACCOUNT_TOKEN

Option 2: Alternative Telemetry Query Path

If MCP servers cannot be configured:

  1. Query Sentry API directly using REST calls (requires SENTRY_ACCESS_TOKEN env var)
  2. Query Grafana API directly using HTTP calls (requires GRAFANA_SERVICE_ACCOUNT_TOKEN env var)
  3. Use local span artifacts if available (requires workflow runs to save span exports)

Option 3: Update Workflow to Fail Fast

Modify the workflow to check for MCP server availability at runtime and fail explicitly if Sentry/Grafana are missing, rather than silently proceeding without data.

Configuration Example

Once secrets are added, the workflow should automatically initialize both MCP servers on the next run. No code changes are needed.

To verify the fix works:

# After adding secrets, rerun the workflow and check:
cat .goose/mcp.json | jq '.mcpServers | keys'
# Expected output: ["github", "grafana", "safeoutputs", "sentry"]

Related Files

  • Workflow source: .github/workflows/daily-token-consumption-report.md
  • Sentry MCP import: .github/workflows/shared/mcp/sentry.md
  • Grafana MCP import: .github/workflows/shared/mcp/grafana.md
  • Compiled workflow: .github/workflows/daily-token-consumption-report.lock.yml

Priority

High - This blocks a critical observability workflow that provides cost control and optimization insights for all agentic workflows in the repository.

Generated by 📊 Daily AIC Consumption Report (Sentry + Grafana OTel) · sonnet45 · 74.5 AIC · ⊞ 6.4K ·

  • expires on Aug 15, 2026, 4:10 AM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions