Skip to content

feat: Add client_info support for custom telemetry in Authentication and Management clients#802

Open
kishore7snehil wants to merge 1 commit intomasterfrom
feat/client-info-override
Open

feat: Add client_info support for custom telemetry in Authentication and Management clients#802
kishore7snehil wants to merge 1 commit intomasterfrom
feat/client-info-override

Conversation

@kishore7snehil
Copy link
Contributor

Changes

  • Add optional client_info dict param to RestClientOptions to override the default telemetry payload
  • Use provided client_info as the Auth0-Client header value in RestClient when telemetry is enabled
  • Thread client_info param through AuthenticationBase constructor to RestClientOptions
  • Add client_info param to ManagementClient - encodes and merges into headers dict
  • Add client_info param to AsyncManagementClient with identical behavior
  • telemetry=False still takes precedence and suppresses all telemetry headers
  • User-Agent header remains Python/{version} regardless of client_info
  • No changes to any Fern-generated files (client.py, client_wrapper.py, http_client.py)

Usage

# Authentication
from auth0.authentication import GetToken

client = GetToken(
    "tenant.auth0.com",
    client_id="YOUR_CLIENT_ID",
    client_info={"name": "auth0-ai-langchain", "version": "1.0.0", "env": {"python": "3.11.0"}},
)

# Management
from auth0.management import ManagementClient

client = ManagementClient(
    domain="tenant.auth0.com",
    token="YOUR_TOKEN",
    client_info={"name": "auth0-ai-langchain", "version": "1.0.0", "env": {"python": "3.11.0"}},
)

@kishore7snehil kishore7snehil requested a review from a team as a code owner March 26, 2026 08:18
Copy link
Member

@duedares-rvj duedares-rvj left a comment

Choose a reason for hiding this comment

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

LGTM

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