Skip to content

chore(ai-gateway): remove Cloudflare analytics - #6084

Open
chrarnoldus wants to merge 1 commit into
mainfrom
chore/remove-ai-gateway-observability
Open

chore(ai-gateway): remove Cloudflare analytics#6084
chrarnoldus wants to merge 1 commit into
mainfrom
chore/remove-ai-gateway-observability

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • remove Cloudflare Analytics API metric emission from chat, embeddings, transcription, and security-agent LLM requests
  • remove response cloning/draining and request tool telemetry used only by the observability integration
  • delete the obsolete API metrics implementation and its tests while preserving billing usage, Sentry telemetry, and the shared O11Y service

Verification

  • local tests not run; CI will handle verification as requested
  • pnpm format:changed
  • git diff --check

Visual Changes

N/A

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Sep 11, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

This change removes the Cloudflare/o11y API-metrics emission and its helpers across the AI gateway and security-agent services; cross-reference verification found no dangling imports, orphaned call sites, or newly-unused locals on the changed lines.

Files Reviewed (11 files)
  • apps/web/src/app/api/openrouter/[...path]/route.test.ts
  • apps/web/src/app/api/openrouter/[...path]/route.ts
  • apps/web/src/app/api/openrouter/audio/transcriptions/route.test.ts
  • apps/web/src/app/api/openrouter/audio/transcriptions/route.ts
  • apps/web/src/app/api/openrouter/embeddings/route.ts
  • apps/web/src/lib/ai-gateway/o11y/api-metrics.server.test.ts
  • apps/web/src/lib/ai-gateway/o11y/api-metrics.server.ts
  • apps/web/src/lib/ai-gateway/providers/upstream-attempt.ts
  • apps/web/src/lib/security-agent/services/analysis-service.ts
  • apps/web/src/lib/security-agent/services/extraction-service.ts
  • apps/web/src/lib/security-agent/services/triage-service.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant