You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 073404c
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/open-telemetry.mdx
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ These attributes appear on built-in workflow setup, agent, and conclusion spans
87
87
<tr><td><code>gh-aw.steering_event_count</code></td><td>Count of steering events recorded during the run.</td></tr>
88
88
<tr><td><code>gh-aw.action_minutes</code></td><td>Elapsed runtime converted to minutes.</td></tr>
89
89
<tr><td><code>gh-aw.tracker.id</code></td><td>Tracker identifier when present.</td></tr>
90
-
<tr><td><code>gh-aw.aic</code></td><td>AI credits consumed for the run when available.</td></tr>
90
+
<tr><td><code>gh-aw.aic</code></td><td>AI credits consumed for the run when available. Also emitted as a <code>gh_aw.aic</code> OTLP metric (see below).</td></tr>
91
91
<tr><td><code>gh-aw.turns</code></td><td>Total agent turns recorded for the run.</td></tr>
<tr><td><code>gh-aw.detection.conclusion</code></td><td>Detection subsystem conclusion when present.</td></tr>
@@ -249,6 +249,26 @@ These attributes are emitted when experiments are active for a run.
249
249
</tbody>
250
250
</table>
251
251
252
+
## OTLP metrics
253
+
254
+
In addition to span attributes, gh-aw emits a native OTLP metric to `/v1/metrics` for AIC so backends can aggregate, alert, and dashboard without needing to extract values from span attributes.
255
+
256
+
<table>
257
+
<thead>
258
+
<tr>
259
+
<th>Metric name</th>
260
+
<th>Type</th>
261
+
<th>Unit</th>
262
+
<th>Description</th>
263
+
</tr>
264
+
</thead>
265
+
<tbody>
266
+
<tr><td><code>gh_aw.aic</code></td><td>Sum (cumulative, monotonic)</td><td>AIC</td><td>AI Credits consumed by the workflow run. Emitted once per run from the job that owns token usage (<code>agent</code> or <code>detection</code>).</td></tr>
267
+
</tbody>
268
+
</table>
269
+
270
+
Data point attributes: `gh-aw.workflow.name`, `gh-aw.run.id`, `gh-aw.run.status`, `gh-aw.job.name`, `gh-aw.engine.id` (when available).
271
+
252
272
## Trace files and artifacts
253
273
254
274
When observability is enabled, trace data is also mirrored to local JSONL files and uploaded in the <code>agent</code> artifact:
In addition to span attributes, gh-aw emits a native OTLP metric payload to `/v1/metrics` so that AIC is a first-class consumable metric for backends that support dashboarding and alerting on OTel metrics (e.g. Grafana, Datadog, Honeycomb).
559
+
560
+
#### Metrics emitted
561
+
562
+
| Metric name | Type | Unit | Description |
563
+
|---|---|---|---|
564
+
|`gh_aw.aic`| Sum (cumulative, monotonic) | AIC | AI Credits consumed by the workflow run. Emitted once from the job that owns token usage (`agent` or `detection`). |
565
+
566
+
#### Data point attributes
567
+
568
+
| Attribute | Type | Description |
569
+
|---|---|---|
570
+
|`gh-aw.workflow.name`| string | Workflow name |
571
+
|`gh-aw.run.id`| string | GitHub Actions run ID |
572
+
|`gh-aw.run.status`| string | Final run status (`success`, `failure`, `timeout`, `cancelled`) |
573
+
|`gh-aw.job.name`| string | Job name (`agent` or `detection`) |
Resource attributes mirror those on conclusion spans (§10.2).
577
+
578
+
#### Aggregation temporality
579
+
580
+
`AGGREGATION_TEMPORALITY_CUMULATIVE` — each data point represents the total AIC for that single workflow run. Backends should **sum** across runs to compute fleet totals, or average to track per-run cost trends.
581
+
556
582
### 10.7 MCP Gateway Span Attribute Contract
557
583
558
584
This section defines the attributes emitted by the MCP gateway (`gh-aw-mcpg`). These spans are emitted under the `mcp-gateway` service but share the workflow's trace ID (linked via `GITHUB_AW_OTEL_TRACE_ID` and `GITHUB_AW_OTEL_PARENT_SPAN_ID` passed to the gateway container per §6.3).
0 commit comments