Skip to content

fix(auth): Add OAuth failure observability#1090

Merged
dcramer merged 1 commit into
mainfrom
auth-observability-token-failures
Jun 12, 2026
Merged

fix(auth): Add OAuth failure observability#1090
dcramer merged 1 commit into
mainfrom
auth-observability-token-failures

Conversation

@dcramer

@dcramer dcramer commented Jun 12, 2026

Copy link
Copy Markdown
Member

This keeps invalid OAuth token responses observable after removing duplicate Cloudflare console capture. The OAuth provider now sends its existing OAuth error response: ... messages through LogTape/Sentry Logs, response spans and metrics get bounded OAuth error attributes, and server-side grant reauthorization decisions emit a low-volume log with a non-secret grant fingerprint.

The change also updates the auth/monitoring playbooks, protects the custom app semantic attribute registry from OTel regeneration, replaces a remaining server-side console.error with logError, and removes the unused Claude optimizer agent file as cleanup.

Validated with pnpm --filter @sentry/mcp-cloudflare tsc, targeted Cloudflare auth/logging tests, pnpm --filter @sentry/mcp-core test -- src/internal/agents/tools/otel-semantics.test.ts, and pnpm run lint.

Add bounded OAuth error telemetry to Cloudflare spans and response metrics so invalid-token responses can be attributed by route, client family, and token shape without logging raw tokens or grant IDs.

Route the OAuth provider's error callback through LogTape/Sentry Logs to preserve the existing provider error count source after removing console logging capture. Add a low-volume reauthorization log for server-side grant revocations, update the semantic attribute registry and docs, and remove the unused Claude optimizer agent file.

Co-Authored-By: GPT-5 Codex <codex@openai.com>
@dcramer dcramer force-pushed the auth-observability-token-failures branch from cf2a999 to 174681f Compare June 12, 2026 17:16
@dcramer dcramer marked this pull request as ready for review June 12, 2026 17:34
@dcramer dcramer merged commit 2125d8c into main Jun 12, 2026
19 checks passed
@dcramer dcramer deleted the auth-observability-token-failures branch June 12, 2026 17:35
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