AcceptedFebruary 2026

Telemetry Contract

Standardized telemetry with canonical agent naming, checkpoint normalization, and bounded attribute sets for stable observability across agent evolution.

Context

Prior telemetry patterns allowed drift: agent names appeared with multiple aliases in metrics, checkpoint labels were inconsistent, unbounded attributes created noisy dimensions, and dashboards broke after innocuous naming changes. Operations needed to trust trend data and alerting over time.

Core Decisions

1. Canonical Agent and Checkpoint Naming

Metrics are emitted using normalized identifiers: canonical agent names, normalized checkpoints (CP-1 to CP-6), and legacy alias mapping for backward compatibility.

2. Bounded and Sanitized Attribute Set

Telemetry helper functions sanitize attribute values and enforce bounded key sets to prevent cardinality blowups and malformed dimensions.

This keeps metric storage predictable and query performance stable regardless of how many agents or workflows are running.

3. Contract Lives in Shared Helper Layer

All emitters use a shared helper for contract-safe metric output instead of ad hoc metric assembly. This ensures every telemetry emission follows the same normalization rules.

4. Backward Compatibility Is Explicit

Legacy aliases are translated to canonical forms so historical dashboards continue to operate while migration completes.

5. Contract Regressions Fail CI

Telemetry contract tests validate canonicalization, alias mapping, and attribute safety before merge.

Telemetry Pipeline

1

Workflow/Agent Event

An event is triggered during workflow execution or agent operation.

2

agentMetrics Helper

The shared helper receives the raw event data.

3

Canonicalization

Agent names and checkpoints are normalized to canonical forms.

4

Attribute Sanitization

Attribute values are sanitized and bounded to prevent cardinality issues.

5

Metric Emission

Clean, contract-safe metrics are emitted to the telemetry backend.

6

Dashboards & Alerts

Stable semantics ensure dashboards and alerts remain trustworthy over time.

Key References

.cli_scripts/copilot/helpers/agentMetrics.ts.github/tests/telemetry-contract.test.ts.github/copilot/instruction-agent-metrics.md

Trade-offs

Dashboard and alert semantics remain stable across refactors. Lower metric cardinality and cleaner query dimensions. Easier operational debugging with consistent identifiers.
Missing alias updates can fragment historical trends. Over-sanitization can hide useful diagnostic detail. Contract drift can return if helper bypasses are introduced.