Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

feat(otel): allow Copilot CLI agents to enrich native spans with delivery context

Ouverte
#4,967 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
shell
Domaine
cli, observability

Piste de recherche

No implementation files, tests, or entry points are named; first locate the Copilot CLI runtime code responsible for creating and exporting native OpenTelemetry spans. Review how context reaches invoke_agent, chat, and execute_tool spans. Done means a governed pre-export hook supports allow-listed, constrained, privacy-controlled attributes with clear provenance and consistent application.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

triage

Problem

Copilot CLI emits useful native OpenTelemetry spans for agent activity, model calls, and tool execution. The observed spans already include gen_ai.* and github.copilot.* data such as conversation IDs, model selection, tool names, and input/output/cache/reasoning token usage.

However, the agent/model cannot enrich those native spans with delivery context. Span creation and export belong to the Copilot CLI runtime, and Copilot CLI currently exposes no supported agent/runtime API or hook to set attributes on its native OTEL spans. Custom instructions, custom agents, MCP servers, and tools cannot reliably fill this gap.

Requested capability

Provide a governed runtime API/hook that allows a Copilot CLI agent (or approved integration) to add allow-listed custom attributes to native Copilot CLI OTEL spans before export.

Illustrative API:

on_span_created(span)
span.set_attribute(key, value)

Goal and use cases

Enable end-to-end correlation of AI-assisted engineering activity with work items, Git changes, and delivery outcomes. An enriched trace/span should support data points such as:

workitem.id
vcs.repository.url.full
vcs.repository.ref.name
vcs.repository.ref.revision
gitlab.merge_request.id
ai.session.id
gen_ai.conversation.id
gen_ai.request.model
gen_ai.response.model
gen_ai.usage.input_tokens
gen_ai.usage.output_tokens
gen_ai.usage.cache_read.input_tokens
gen_ai.usage.cache_write.input_tokens
gen_ai.usage.reasoning.output_tokens
gen_ai.tool.name

The primary correlation key is repository identity plus commit SHA. That joins Copilot traces to Git commits, merge requests, pipelines, artifacts, deployments, and production outcomes. Ticket and session identifiers provide supporting context. The capability should also support integrations with ticketing systems and approved software-supply-chain/provenance standards.

Requirements

  • Attribute mutations occur in the CLI runtime before export, not through model prompting alone.
  • Allow-list attribute keys and constrain types, value sizes, and cardinality.
  • Support privacy/redaction controls and organization policy.
  • Make provenance clear: identify whether an attribute was supplied by the runtime, agent, or integration.
  • Apply configured context consistently to relevant native spans, including invoke_agent, chat, and execute_tool.
  • Preserve existing OTEL semantic conventions where applicable, especially vcs.* and gen_ai.*.

Workaround

An OpenTelemetry Collector or OTLP proxy can enrich exported spans externally today. This works for process-wide Git/Jira context, but does not provide agent-aware, per-span enrichment at the point where Copilot CLI creates the spans.

Observed version

GitHub Copilot CLI 1.0.88.

Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
17 h 6 min
PR mergées (30 j)
5

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de github/copilot-cli

Toutes les issues de github/copilot-cli

Issues similaires

Plus d'issues Shell/Bash

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.