Repository navigation
Expand OTLP metrics reference documentation - #79082
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
The documentation still contains two active accuracy and usability issues: it misstates the units for error aliases and omits the exact result attribute key and metric names.
2 open issues
What changed in this PR
Expands the OpenTelemetry metrics reference to document built-in and custom metrics, default enablement, export behavior, batching, resource filtering, and secret handling.
Changes:
- Documents built-in metric names, types, units, attributes, emission conditions, and compatibility aliases.
- Adds
logMetric()validation, cardinality limits, batching, and series-merging behavior. - Clarifies export-failure reporting, resource attribute filtering, and secret screening.
| File | Description |
|---|---|
| docs/src/content/docs/reference/open-telemetry.mdx | Expands the OTLP metrics reference with built-in and custom instrumentation details, enablement behavior, export handling, batching, resource filtering, and security constraints. |
Review effort: Lite (adaptive)
|
|
||
| The built-ins include `gh_aw.job.duration` (histogram, `s`) and `gh_aw.job.errors` (counter, `{job}` for failed, timed-out, and cancelled jobs), `gen_ai.client.token.usage` (counter, `{token}`, by `gen_ai.token.type` for input, output, cache-read, and cache-write tokens), `gh_aw.agent.turns` (histogram, `{turn}`), `gh_aw.tool_calls` (counter, `{call}`, by `gh-aw.tool.status`), and `gh_aw.workflow.output.items` (counter, `{item}`, by `gh-aw.safe_output.type`). AI-credit limit and rate-limit errors and OTLP export failures are also counted when known. | ||
| Built-in metrics are emitted at job completion. Counters and histograms use delta temporality; durations and counts are job-level measurements. | ||
| Unless noted, built-in metrics include `gh-aw.job.name` and `gh-aw.workflow.name` when available. Compatibility metrics use their corresponding metric's type, unit, and attributes, with the run metrics using the run conclusion as noted below. |
There was a problem hiding this comment.
Updated in 9964484: gh_aw.job.errors uses {job}, while gh_aw.run.errors uses {run}.
| | `gh_aw.job.duration` | Histogram, `s` | Job result, job and workflow names, and (when known) engine and model; emitted for each completed job. | | ||
| | `gh_aw.job.errors` | Counter, `{job}` | Job result; emitted for `failure`, `timed_out`, or `cancelled` jobs. | |
There was a problem hiding this comment.
Updated in 9964484: the reference now names cicd.pipeline.task.run.result, gh-aw.job.name, and gh-aw.workflow.name explicitly, including the run-alias mapping.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "9b8904459fdcda34cab6c3f5b232184d46901a8f",
"kind": "requested",
"schema_version": "1",
"state": "317a359d3f93fe90837d39926a0e36e23b7972db550510c5caffdf05bafc67a0",
"work": [
"efc3000fd30e8423ece7d83c8c0c27c060ccecaad77ad969f62ce51270eebd02",
"f84946e795d2153d225d0a19b77e43f598b3022c7113d8ed231552c8ae79aceb"
],
"workflow": "pr-sous-chef"
}
|
…ics-documentation Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

The OTLP metrics documentation lacked a complete built-in metrics reference and details on custom metrics, batching, failure reporting, resource attributes, and secret screening. It also incorrectly described metrics as opt-in.
logMetric()parameters, validation, cardinality limits, batching, and series merging.