Skip to content

feat: Add User-Agent header to CLI API requests for usage tracking #194

Description

@jeff-schnitter

Add a User-Agent header (cortexapps-cli/) to all HTTP requests made by CortexClient so CLI usage can be identified and tracked in DataDog.

Motivation

There is currently no way to distinguish CLI-originated API traffic from other sources in DataDog logs.

Approach

  • Set User-Agent header on all requests in CortexClient.request()
  • Version resolved via importlib.metadata.version()
  • Format: cortexapps-cli/ (e.g. cortexapps-cli/1.9.1)
  • No server-side changes required — User-Agent is already logged and indexed in DataDog

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions