Skip to content

OTLP metrics documentation gaps — built-in metrics, logMetric API, batching, security #79081

Done

Description

@eedorenko

Context

This follows up on #78427 (OTLP metrics feature request) and PR #78433 (implementation).

I compared the current open-telemetry.mdx docs against the implementation (otlp_metrics.cjs, send_otlp_span.cjs, otlp_response.cjs, observability_otlp.go) and found several documentation gaps.

Gaps found

The existing Metrics section is accurate but compressed into two paragraphs and misses details:

  • Built-in metrics table: no table listing name, type, unit, attributes, and emission conditions. The gen_ai.token.type values (input/output/input_cache_read/input_cache_write), gh_aw.ai.credits.*, and gh_aw.otlp.export.failures are not fully documented.
  • Compatibility alias table: not documented (e.g., gh_aw_job_duration_seconds → gh_aw.job.duration).
  • logMetric() API: no parameter table, validation rules, or cardinality guards (8 attributes, 100 series, 128-char limits, high-cardinality key patterns, non-negative counters).
  • Batching: 1-second flush window, series merging semantics, and flush-before-built-in-export behavior not described.
  • Export failure metric: gh_aw.otlp.export.failures semantics and fixed attribute classes not documented.
  • Metric resource attributes: allowed set, 128-char cap, and what is excluded.
  • Secret screening: drop-and-redact behavior for metric attributes.
  • Stale "opt-in" mention: metrics are default-on since Add opt-in OTLP metrics emission for per-job run observability #78433, but one reference still says "opt-in".

Implementation

I implemented the doc updates in my fork since I cannot create PRs against this repo directly:

The PR adds ~50 lines of documentation: built-in metrics table, compatibility aliases, resource attributes, batching section, export failure metric, logMetric() parameter table with validation/limits/cardinality guards, and secret screening. All claims were verified against the source code.

Related

Activity

  1. locked and limited conversation to collaborators on Nov 18, 2026
  2. unlocked this conversation on Nov 18, 2026
  3. eedorenko commented on Nov 18, 2026

    @eedorenko
    Author

    @pelikhan, please have a look. It's just a doc update to reflect recent metrics enhancement. There's a PR in my fork (eedorenko/agentic-factory-v2#585) as I can't create a PR in the upstream (https://github.com/github/gh-aw) repo.

  4. linked a pull request that will close this issueExpand OTLP metrics reference documentation #79082on Nov 18, 2026
  5. locked and limited conversation to collaborators on Nov 18, 2026
  6. unlocked this conversation on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions