Skip to content

feat(seer-infra-telemetry): Add a PAT-only DatadogIdentityProvider#118072

Merged
srest2021 merged 2 commits into
masterfrom
srest2021/CW-1523-v2
Jun 18, 2026
Merged

feat(seer-infra-telemetry): Add a PAT-only DatadogIdentityProvider#118072
srest2021 merged 2 commits into
masterfrom
srest2021/CW-1523-v2

Conversation

@srest2021

@srest2021 srest2021 commented Jun 18, 2026

Copy link
Copy Markdown
Member

relates to CW-1523

Adds a standalone DatadogPatIdentityProvider for connecting Datadog via a user-supplied read-only personal access token (PAT), alongside the existing OAuth provider.

Datadog's MCP OAuth flow only accepts loopback redirect URIs, so it can't be used from a hosted server. A read-only PAT is a Bearer token usable identically to an OAuth access token against the MCP server, so this is the fallback for server environments, unless we're able to register as a client with Datadog.

Followup: #118073

@linear-code

linear-code Bot commented Jun 18, 2026

Copy link
Copy Markdown

CW-1523

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 18, 2026
Comment thread src/sentry/identity/__init__.py
@srest2021 srest2021 marked this pull request as ready for review June 18, 2026 21:36
@srest2021 srest2021 requested a review from a team as a code owner June 18, 2026 21:36

@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 cbddb62. Configure here.

Comment thread src/sentry/identity/datadog/provider.py
Comment thread src/sentry/identity/datadog/provider.py
@srest2021 srest2021 requested a review from a team as a code owner June 18, 2026 21:47
Comment thread src/sentry/identity/datadog/provider.py
@srest2021 srest2021 requested review from shashjar and wedamija June 18, 2026 21:59
base = _mcp_base_url_for_site(identity_data.get("site"))
return f"{base}{MCP_ENDPOINT_PATH}" if base else None

def build_identity(self, data: dict[str, Any]) -> dict[str, Any]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wondering if a lot of this could be consolidated with the existing datadog provider? Not sure how much overlap there is.

I suppose it might not be worth it, since probably long term we'll only keep one of these providers.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, since we'll know (hopefully) soon whether we can go forward with the oauth version, probably easier to keep separate for clean deletion

@srest2021 srest2021 merged commit 90996d5 into master Jun 18, 2026
87 checks passed
@srest2021 srest2021 deleted the srest2021/CW-1523-v2 branch June 18, 2026 22:57
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.

2 participants