Skip to content

feat: send x-descope-sdk-* headers to identify SDK usage - #48

Merged
gaokevin1 merged 1 commit into
mainfrom
feat/sdk-usage-headers
Nov 24, 2026
Merged

gaokevin1 merged 1 commit into
mainfrom
feat/sdk-usage-headers

Conversation

@gaokevin1

Copy link
Copy Markdown
Member

Description

Descope analytics groups traffic by x-descope-sdk-name and x-descope-sdk-version, which python-sdk and node-sdk send on every request. This SDK sent only a hardcoded User-Agent from Python and nothing from TypeScript, so its usage couldn't be seen.

In a Nutshell

  • Python sends x-descope-sdk-name: agent-auth-python, x-descope-sdk-version, and x-descope-sdk-python-version. The User-Agent now uses the real version.
  • TypeScript sends x-descope-sdk-name: agent-auth-js, x-descope-sdk-version, and x-descope-sdk-node-version when running on Node (not on Workers, Deno or browsers).
  • Using separate names keeps this traffic apart from the core SDKs (python, nodejs). It shows up under the "other SDKs" breakdown of x-descope-sdk-name-version in the customer-success analytics.
  • The version comes from one constant per SDK (_version.py, version.ts). A test fails if it doesn't match pyproject.toml / package.json.

Must

  • Tests
  • Documentation (if applicable)

🤖 Generated with Claude Code

Descope analytics groups traffic by x-descope-sdk-name and
x-descope-sdk-version, as sent by python-sdk and node-sdk. This SDK sent
only a hardcoded User-Agent (Python) or nothing (TypeScript), so its usage
was invisible.

- Python: x-descope-sdk-name=agent-auth-python, x-descope-sdk-version,
  x-descope-sdk-python-version; User-Agent now uses the real version
- TypeScript: x-descope-sdk-name=agent-auth-js, x-descope-sdk-version,
  and x-descope-sdk-node-version when running on Node
- Distinct names keep this traffic apart from the core SDKs
  ("python", "nodejs")
- Version comes from one constant per SDK (_version.py / version.ts),
  with a test that it matches pyproject.toml / package.json

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shuni-bot

shuni-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🐕 Shuni Review

No new issues found.

🤖 Model: claude-opus-5.5 · Effort: medium


Review scope: Full review

Reviewed files (7)
  • python/descope_agent_auth/init.py
  • python/descope_agent_auth/_http.py
  • python/descope_agent_auth/_version.py
  • python/tests/test_sdk_headers.py
  • typescript/src/httpClient.ts
  • typescript/src/sdkHeaders.test.ts
  • typescript/src/version.ts

🐕 Review complete — View session on Shuni Portal 🐾

🤖 Model: claude-opus-5.5 · Effort: medium

@shuni-bot shuni-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🐕 Shuni review: no new findings. Every changed file in this pull request was reviewed.

The full review summary is in Shuni's sticky review comment on this pull request.

@gaokevin1
gaokevin1 requested a review from slavikm November 23, 2026 21:23
@gaokevin1
gaokevin1 merged commit c691535 into main Nov 24, 2026
20 checks passed
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.

2 participants