Skip to content

feat: embed solution name in CLI user-agent for Datadog telemetry - #252

Merged
jeff-schnitter merged 2 commits into
mainfrom
solutions-datadog-telemetry
Nov 12, 2026
Merged

jeff-schnitter merged 2 commits into
mainfrom
solutions-datadog-telemetry

Conversation

@jeff-schnitter

Copy link
Copy Markdown
Collaborator

Summary

  • Adds solution name to the CLI User-Agent header when running cortex solutions install — e.g. cortexapps-cli/1.52.0 (solutions/workday) — so solution usage is visible in Datadog by solution and by tenant
  • Emits a lightweight GET /api/v1/catalog/definitions call at the start of install so setup-script-only solutions (like workday, which make no backup import requests) always produce a log entry
  • Extends CortexClient.__init__ to accept an optional command parameter that is embedded in the user-agent

Test plan

  • Run cortex solutions install -s workday and confirm logs appear in Datadog CLI Usage dashboard under "Solutions Subcommand (by tenant)" and "Solutions Subcommand (by solution name)"
  • Confirm user-agent in logs reads cortexapps-cli/X.Y.Z (solutions/workday)
  • Confirm other commands unaffected (user-agent unchanged when command is not set)
  • Run existing test suite: just test-all

Version

This is a feat: commit → will bump 1.52.0 → 1.53.0

🤖 Generated with Claude Code

jeff-schnitter and others added 2 commits November 12, 2026 09:35
Include the solution name in the User-Agent header when running
cortex solutions install (e.g. cortexapps-cli/1.52.0 (solutions/workday)),
so solution usage is visible in Datadog by solution and by tenant.

Also emit a lightweight API call at the start of install so setup-script-only
solutions (which make no backup import requests) always produce a log entry.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
_post_install_menu calls Prompt.ask() which hangs in non-TTY test
environments. The test is verifying the no-setup-script path, not
the interactive menu, so mocking it is correct.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@jeff-schnitter
jeff-schnitter merged commit 76ab26b into main Nov 12, 2026
3 checks passed
@jeff-schnitter
jeff-schnitter deleted the solutions-datadog-telemetry branch November 12, 2026 18:34
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.

1 participant