feat(otel): allow Copilot CLI agents to enrich native spans with delivery context
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- shell
- Ambito
- cli, observability
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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, andexecute_tool. - Preserve existing OTEL semantic conventions where applicable, especially
vcs.*andgen_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.
- Lingua principale
- Shell
- Stelle
- 11.2k
- Fork
- 1.9k
- Merge medio
- 17h 6m
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/copilot-cli
-
area:sessions
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/copilot-cli#4996 ·
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
github/copilot-cli#4963 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
github/copilot-cli#4932 ·
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
github/copilot-cli#4909 ·
I maintainer di solito rispondono entro 1 giorno
-
triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/copilot-cli#4906 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di github/copilot-cli
Issue simili
-
Bug: pane path not quotedApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Does a subagent definition's `tools:` bypass the permission check? One default-permission cellAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pearu/agent-sandbox#156 ·
I maintainer di solito rispondono entro 1 giorno
-
area/documentation squad/marvin
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
rancher/stackstate-product-docs#443 ·
I maintainer di solito rispondono entro 1 giorno
-
Request: Remove Sikka appAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
getumbrel/umbrel-apps#6142 ·
I maintainer di solito rispondono entro 2 giorni
-
triage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
agentscope-ai/agentscope#3030 ·
I maintainer di solito rispondono entro 1 giorno