Skip to content

feat(seer-infra-telemetry): Bypass DCR if user is already linked to an Identity with existing client id and secret#117358

Merged
srest2021 merged 4 commits into
masterfrom
srest2021/reuse-dcr
Jun 11, 2026
Merged

feat(seer-infra-telemetry): Bypass DCR if user is already linked to an Identity with existing client id and secret#117358
srest2021 merged 4 commits into
masterfrom
srest2021/reuse-dcr

Conversation

@srest2021

@srest2021 srest2021 commented Jun 10, 2026

Copy link
Copy Markdown
Member

Datadog's MCP OAuth requires client registration which we implement via DCR. Each DCR call creates a new client. On re-authorization, this means we'd register a throwaway client every time, even though Datadog client secrets don't expire.

This PR reuses DCR credentials (client_id/client_secret) from an existing Identity record when the user has already linked their Datadog account. Falls back to fresh DCR registration when no identity exists or stored credentials are missing.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 10, 2026
… Identity with existing client id and secret

Reuse DCR credentials from an existing identity when available, avoiding
unnecessary re-registration with the Datadog MCP server.
@srest2021 srest2021 force-pushed the srest2021/reuse-dcr branch from 507b835 to 1aab337 Compare June 10, 2026 20:38
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 10, 2026
@srest2021 srest2021 changed the base branch from srest2021/CW-1469 to master June 10, 2026 20:38
@getsentry getsentry deleted a comment from github-actions Bot Jun 10, 2026
@srest2021 srest2021 removed the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 10, 2026
@srest2021 srest2021 changed the title fix(seer-infra-telemetry): Bypass DCR if user is already linked to an Identity with existing client id and secret feat(seer-infra-telemetry): Bypass DCR if user is already linked to an Identity with existing client id and secret Jun 10, 2026
@srest2021 srest2021 marked this pull request as ready for review June 10, 2026 20:59
@srest2021 srest2021 requested a review from a team as a code owner June 10, 2026 20:59
Comment thread src/sentry/identity/datadog/provider.py
Comment thread tests/sentry/identity/datadog/test_provider.py
Comment thread tests/sentry/identity/datadog/test_provider.py Outdated
Comment thread tests/sentry/identity/datadog/test_provider.py Outdated
Comment thread src/sentry/identity/datadog/provider.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 90f625f. Configure here.

Comment thread src/sentry/identity/datadog/provider.py
@srest2021 srest2021 merged commit 75c451f into master Jun 11, 2026
64 checks passed
@srest2021 srest2021 deleted the srest2021/reuse-dcr branch June 11, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants