Skip to content

Send an attributable User-Agent on REST and OAuth requests (camunda-orchestration-sdk-python/<version>) #476

Closed

Description

@jwulf

Why

Gateway usage reports group requests by the first name in the User-Agent header (for example zeebe-client-go/8.5, zeebe-client-java/8.7, grpc-dotnet/2.80). We want to tell traffic from our SDKs apart from customer-built clients. Right now traffic from this SDK is indistinguishable from any hand-rolled client in the same language.

The Rust (camunda-orchestration-sdk-rust/<ver>), D (camunda-orchestration-sdk-d/<ver>) and PHP (camunda-orchestration-php/<ver>) SDKs already identify themselves. Tracking issue for Go: camunda/orchestration-cluster-api-go#207.

Current behaviour (main)

Connection What is sent Where
REST python-httpx/<ver> (httpx default) generated/camunda_orchestration_sdk/client.py: httpx.Client(...) / httpx.AsyncClient(...) get no User-Agent
OAuth token request python-httpx/<ver> runtime auth: no User-Agent set

generator-config.yaml sets httpUserAgent: camunda-orchestration-sdk/0.1.0 (python). That is an openapi-generator option, and openapi-python-client ignores it, so it has no effect. Its version is also stale.

Proposal

Pass headers={"User-Agent": f"camunda-orchestration-sdk-python/{importlib.metadata.version('camunda-orchestration-sdk')}"} to the httpx clients the runtime creates (and to the token request). Remove the dead httpUserAgent setting.

Acceptance

  • Every request (all REST operations and the OAuth token request) sends User-Agent: camunda-orchestration-sdk-python/<version> as the first name in the header, with the real released version.
  • An application-supplied user agent (a config option or CAMUNDA_USER_AGENT) is appended after the SDK identifier, never replacing it, so traffic stays attributable.
  • Tests assert the header on a REST call and on the token request.
  • Backport to stable/10 (and stable/9), so customers on released versions become attributable too.

Activity

  1. added
    backport stable/10
    backport stable/9
    on Nov 19, 2026
  2. jwulf commented on Nov 19, 2026

    @jwulf
    MemberAuthor

    Implementation note: label the PR for backport to every supported stable line in this repo (backport stable/10, backport stable/9), so the fix reaches released versions. Before applying each label, check that the code being changed exists on that branch (repo AGENTS.md); leave a label off and say why in the PR description if it does not apply.

  3. jwulf commented on Nov 19, 2026

    @jwulf
    MemberAuthor

    🤖 Starting work on this issue — branch feat/issue-476.

  4. jwulf commented on Nov 19, 2026

    @jwulf
    MemberAuthor

    🤖 Pull request opened: #477 — feat: send attributable User-Agent on REST and OAuth requests (#477)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backport stable/10backport stable/9

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions