Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Telemetry: add an in-process span sink

未关闭
#2,314 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
azure, python

调研方向

从 Python SDK 的 TelemetryConfig 和 CopilotClient 的遥测配置入手,然后追踪现有的 otlp-http 和 file span 路径。定义由主机提供的 exporter 或 callback 如何在进程内接收 spans 和 resources;完成的标准是 CLI 的模型和工具 spans 可以使用主机现有的 OpenTelemetry pipeline,而无需 loopback server 或第二个 exporter。

由索引模型根据 Issue 内容生成。

描述

enhancement

TelemetryConfig supports otlp-http and file. Both send spans out of the process. If the app embedding the SDK already has an OpenTelemetry pipeline set up, there's no way to plug the CLI's spans straight into it.

Our stack is Microsoft Agent Framework on top of the Python SDK, running as an Azure AI Foundry hosted agent. The service sets up an OpenTelemetry tracer provider that exports to Azure Monitor, so host-side spans like agent invocations and tool execution land in Application Insights. The CLI's model and tool calls don't, since its spans have nowhere to go except back out over OTLP.

To get them in, we start a loopback HTTP server on an ephemeral port, point otlp_endpoint at it, decode the OTLP/JSON, and pass each span to the tracer provider the service already has. It works, but it's an HTTP server and a decoder just to move spans between two objects in the same process.

A sidecar collector was the other option we tried. It means a second exporter and resource to configure, and it doesn't help when running locally.

What would help

Some way to receive the spans in-process. A callback, or an exporter instance supplied by the host:

CopilotClient(telemetry={"exporter": my_span_exporter})

The exact API doesn't matter much to us. What we want is for the CLI's spans to go through the exporter and resource the host already has, instead of a second pipeline alongside it.

主要语言
Java
星标
10.5k
派生
1.5k
平均合并
1 天 9 小时
30 天内合并 PR
130

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/copilot-sdk 的其他 Issue

查看 github/copilot-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。