-
Notifications
You must be signed in to change notification settings - Fork 3k
docs(telemetry): align config and docs semantics for target, outfile, and CLI flags #4066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aa1e8dd
80425ba
ddb5e8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,25 +51,21 @@ observability framework — Qwen Code's observability system provides: | |||||||||||||||
|
|
||||||||||||||||
| ## Configuration | ||||||||||||||||
|
|
||||||||||||||||
| > [!note] | ||||||||||||||||
| > | ||||||||||||||||
| > **⚠️ Special Note: This feature requires corresponding code changes. This documentation is provided in advance; please refer to future code updates for actual functionality.** | ||||||||||||||||
|
|
||||||||||||||||
| All telemetry behavior is controlled through your `.qwen/settings.json` file. | ||||||||||||||||
| These settings can be overridden by environment variables or CLI flags. | ||||||||||||||||
|
|
||||||||||||||||
| | Setting | Environment Variable | CLI Flag | Description | Values | Default | | ||||||||||||||||
| | -------------------------------- | -------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | ----------------- | ----------------------- | | ||||||||||||||||
| | `enabled` | `QWEN_TELEMETRY_ENABLED` | `--telemetry` / `--no-telemetry` | Enable or disable telemetry | `true`/`false` | `false` | | ||||||||||||||||
| | `target` | `QWEN_TELEMETRY_TARGET` | `--telemetry-target <local\|gcp>` | Where to send telemetry data | `"gcp"`/`"local"` | `"local"` | | ||||||||||||||||
| | `otlpEndpoint` | `QWEN_TELEMETRY_OTLP_ENDPOINT` | `--telemetry-otlp-endpoint <URL>` | OTLP collector endpoint | URL string | `http://localhost:4317` | | ||||||||||||||||
| | `otlpProtocol` | `QWEN_TELEMETRY_OTLP_PROTOCOL` | `--telemetry-otlp-protocol <grpc\|http>` | OTLP transport protocol | `"grpc"`/`"http"` | `"grpc"` | | ||||||||||||||||
| | `otlpTracesEndpoint` | `QWEN_TELEMETRY_OTLP_TRACES_ENDPOINT` | - | Per-signal endpoint override for traces (HTTP only) | URL string | - | | ||||||||||||||||
| | `otlpLogsEndpoint` | `QWEN_TELEMETRY_OTLP_LOGS_ENDPOINT` | - | Per-signal endpoint override for logs (HTTP only) | URL string | - | | ||||||||||||||||
| | `otlpMetricsEndpoint` | `QWEN_TELEMETRY_OTLP_METRICS_ENDPOINT` | - | Per-signal endpoint override for metrics (HTTP only) | URL string | - | | ||||||||||||||||
| | `outfile` | `QWEN_TELEMETRY_OUTFILE` | `--telemetry-outfile <path>` | Save telemetry to file (overrides `otlpEndpoint`) | file path | - | | ||||||||||||||||
| | `logPrompts` | `QWEN_TELEMETRY_LOG_PROMPTS` | `--telemetry-log-prompts` / `--no-telemetry-log-prompts` | Include prompts in telemetry logs | `true`/`false` | `true` | | ||||||||||||||||
| | `includeSensitiveSpanAttributes` | `QWEN_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES` | - | Include sensitive attributes in log-to-span bridge spans | `true`/`false` | `false` | | ||||||||||||||||
| | Setting | Environment Variable | CLI Flag | Description | Values | Default | | ||||||||||||||||
| | -------------------------------- | -------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------- | ----------------------- | | ||||||||||||||||
| | `enabled` | `QWEN_TELEMETRY_ENABLED` | `--telemetry` / `--no-telemetry` | Enable or disable telemetry | `true`/`false` | `false` | | ||||||||||||||||
| | `target` | `QWEN_TELEMETRY_TARGET` | `--telemetry-target <local\|gcp>` _(deprecated)_ | Informational destination label; does not control exporter routing — set `otlpEndpoint` or `outfile` to configure where data is sent | `"gcp"`/`"local"` | `"local"` | | ||||||||||||||||
|
doudouOUC marked this conversation as resolved.
|
||||||||||||||||
| | `otlpEndpoint` | `QWEN_TELEMETRY_OTLP_ENDPOINT` | `--telemetry-otlp-endpoint <URL>` | OTLP collector endpoint | URL string | `http://localhost:4317` | | ||||||||||||||||
|
doudouOUC marked this conversation as resolved.
doudouOUC marked this conversation as resolved.
|
||||||||||||||||
| | `otlpProtocol` | `QWEN_TELEMETRY_OTLP_PROTOCOL` | `--telemetry-otlp-protocol <grpc\|http>` | OTLP transport protocol | `"grpc"`/`"http"` | `"grpc"` | | ||||||||||||||||
| | `otlpTracesEndpoint` | `QWEN_TELEMETRY_OTLP_TRACES_ENDPOINT` | - | Per-signal endpoint override for traces (HTTP only) | URL string | - | | ||||||||||||||||
| | `otlpLogsEndpoint` | `QWEN_TELEMETRY_OTLP_LOGS_ENDPOINT` | - | Per-signal endpoint override for logs (HTTP only) | URL string | - | | ||||||||||||||||
| | `otlpMetricsEndpoint` | `QWEN_TELEMETRY_OTLP_METRICS_ENDPOINT` | - | Per-signal endpoint override for metrics (HTTP only) | URL string | - | | ||||||||||||||||
| | `outfile` | `QWEN_TELEMETRY_OUTFILE` | `--telemetry-outfile <path>` | Save telemetry to file (overrides OTLP export) | file path | - | | ||||||||||||||||
| | `logPrompts` | `QWEN_TELEMETRY_LOG_PROMPTS` | `--telemetry-log-prompts` / `--no-telemetry-log-prompts` | Include prompts in telemetry logs | `true`/`false` | `true` | | ||||||||||||||||
| | `includeSensitiveSpanAttributes` | `QWEN_TELEMETRY_INCLUDE_SENSITIVE_SPAN_ATTRIBUTES` | - | Include sensitive attributes in log-to-span bridge spans | `true`/`false` | `false` | | ||||||||||||||||
|
|
||||||||||||||||
| **Note on boolean environment variables:** For the boolean settings (`enabled`, | ||||||||||||||||
| `logPrompts`, `includeSensitiveSpanAttributes`), setting the | ||||||||||||||||
|
|
@@ -187,16 +183,20 @@ For local development and debugging, you can capture telemetry data locally: | |||||||||||||||
| ### File-based Output (Recommended) | ||||||||||||||||
|
|
||||||||||||||||
| 1. Enable telemetry in your `.qwen/settings.json`: | ||||||||||||||||
|
|
||||||||||||||||
| ```json | ||||||||||||||||
| { | ||||||||||||||||
| "telemetry": { | ||||||||||||||||
| "enabled": true, | ||||||||||||||||
| "target": "local", | ||||||||||||||||
| "otlpEndpoint": "", | ||||||||||||||||
| "outfile": ".qwen/telemetry.log" | ||||||||||||||||
|
doudouOUC marked this conversation as resolved.
|
||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| > **Note:** When `outfile` is set, OTLP export is automatically disabled. | ||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] The Note explains the Looking at const outfile =
argv.telemetryOutfile ?? env['QWEN_TELEMETRY_OUTFILE'] ?? settings.outfile;Two concrete scenarios this Note doesn't help with:
Suggested change
— claude-opus-4-7[1m] via Qwen Code /qreview |
||||||||||||||||
| > The `target` and `otlpEndpoint` settings are not needed for file-only | ||||||||||||||||
| > output and can be safely omitted from your config. | ||||||||||||||||
|
|
||||||||||||||||
| 2. Run Qwen Code and send prompts. | ||||||||||||||||
| 3. View logs and metrics in the specified file (e.g., `.qwen/telemetry.log`). | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.