How to configure telemetry
Turn telemetry on or off, send it to your own collector, and preview what the CLI would send. For what each level collects, see telemetry and privacy and the telemetry reference.
Prerequisites
agent-marketplaceon yourPATH.- A user configuration file at
~/.agents/config.yaml.telemetry enablerefuses to run without one; create it withagent-marketplace init. - For a personal installation, an OTLP/HTTP endpoint you control. Release binaries have no built-in endpoint, so nothing is sent until you or your organization set one.
1. Check the current state
agent-marketplace telemetry statusWith nothing configured:
Telemetry status
Effective level: off (user)
Primary endpoint: none
Primary headers: none
Retention policy: none
Community reporting: false
Managed installation: false
Installation ID: not set
Pending records: 0 (oldest none, 0 B)
Diagnostic payloads: 0
Last delivery failure: noneThe word in parentheses shows where a value came from: user (your config or environment) or org (an organization policy). On a managed installation, Managed installation is true and a Locked by organization: line lists the fields the policy controls.
2. Enable telemetry with your own endpoint
agent-marketplace telemetry enable \
--level detailed \
--endpoint https://otel.example.comThe command prints Telemetry enabled at "detailed" with endpoint "https://otel.example.com" and saves both values to ~/.agents/config.yaml. The level is basic or detailed.
Give a base URL without a path, and the CLI sends metrics to /v1/metrics and traces to /v1/traces. A URL with a path is used unchanged for both. A user endpoint must use HTTPS or a loopback address such as http://localhost:4318. If the endpoint is rejected, the new level is already saved; check with agent-marketplace telemetry status.
To change only the level and keep the configured endpoint, omit --endpoint:
agent-marketplace telemetry enable --level basicIt prints Telemetry enabled at "basic".
3. Disable telemetry
agent-marketplace telemetry disableThis sets your level to off and prints Telemetry disabled for user preference. If an organization policy sets a level, telemetry stays on at that level and the command also prints Organization policy keeps telemetry active at "<level>".
4. Override settings for one command
Environment variables apply to one run and are not saved:
AGENT_MARKETPLACE_TELEMETRY_LEVEL=basic \
AGENT_MARKETPLACE_TELEMETRY_ENDPOINT=https://otel.example.com \
agent-marketplace syncThe run prints the usual Installed ... Removed ... summary and exits 0. AGENT_MARKETPLACE_TELEMETRY_COMMUNITY_REPORTING=true turns on community reporting for the run. It sends nothing unless the binary was built with a project endpoint and the level is not off, so it does nothing on release binaries.
The CLI ignores the standard OTEL_* variables and logs a warning for each one it finds.
5. Preview a payload
agent-marketplace telemetry preview --level detailedThis writes a sample JSON payload under the state directory (default ~/.local/state/agent-marketplace/telemetry/preview/) and prints its path with the endpoint host, retention, and headers that would apply. Nothing is sent:
Preview payload written to /home/you/.local/state/agent-marketplace/telemetry/preview/<file>.json
level: detailed
endpoint host: otel.example.com
retention: none
headers: noneThe level is basic, detailed, or diagnostic. A diagnostic preview may contain sensitive data, so the command asks for confirmation; in a non-interactive shell, pass --diagnostic-accept-sensitive-data.
6. Clear local telemetry data
agent-marketplace telemetry purgedeletes undelivered records and retained diagnostic payloads, and printsPurged <n> queued record(s) and <n> diagnostic payload(s).agent-marketplace telemetry reset-idcreates a new installation ID, purges pending telemetry, and printsInstallation ID reset. New ID: <id>
Organization policy
A policy in /etc/agent-marketplace/config.yaml overrides your settings:
- A policy level is always the effective level.
telemetry enablerefuses a lower level withorganization policy requires telemetry level "<level>" or higher. - A policy endpoint makes
telemetry enable --endpointfail withendpoint is locked by organization policy. - Any policy
telemetryblock makes the CLI ignoreAGENT_MARKETPLACE_TELEMETRY_LEVEL.AGENT_MARKETPLACE_TELEMETRY_ENDPOINTandAGENT_MARKETPLACE_TELEMETRY_COMMUNITY_REPORTINGare ignored only when the policy sets the matching field.
Troubleshooting
user config not found at "..."; run 'agent-marketplace init' first: runagent-marketplace init, thentelemetry enableagain.telemetry statusshowsLocked by organization:: the policy controls those fields. Ask the owner of/etc/agent-marketplace/config.yaml.- Nothing is sent: check that
telemetry statusshows a level other thanoffand an endpoint other thannone. Check the endpoint path (step 2) and anyca_filein your telemetry config.Last delivery failureshows the latest error;--debugprints telemetry setup logs.