github / github/copilot-cli

Explicitly trust an insecure (http://) OTLP exporter endpoint (align with VS Code + Copilot Default OTLP Endpoint)

Đang mở
#4,567 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

area:configuration area:networking
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

Describe the feature or problem you'd like to solve

Add an opt-in to trust an insecure (http://) OTLP exporter endpoint — e.g. a loopback collector at http://localhost:4318 — instead of silently disabling telemetry export.

Proposed solution

With the OTLP/HTTP exporter and an http:// endpoint — including the documented default http://localhost:4318 — the Copilot CLI disables telemetry export rather than sending it. copilot help monitoring states export is disabled "rather than sent in cleartext; startup is not aborted," so the only signal is a process-log warning. There is no environment variable or setting to opt into exporting over an insecure/loopback endpoint. The only local no-TLS path is the file exporter (COPILOT_OTEL_FILE_EXPORTER_PATH); any network path requires an https:// endpoint with a trusted cert.

This deviates from the OpenTelemetry protocol-exporter spec (https://opentelemetry.io/docs/specs/otel/protocol/exporter/), which governs OTLP/HTTP transport security by the URL scheme ("OTLP/HTTP always uses the scheme provided for the endpoint"), scopes OTEL_EXPORTER_OTLP_INSECURE to OTLP/gRPC only, and says SDKs SHOULD default to the http scheme. A spec-compliant OTLP/HTTP exporter pointed at http://localhost:4318 therefore exports over http. The VS Code Copilot extension already does exactly this (its documented default is http://localhost:4318); only the CLI refuses, with no escape hatch.

Request: honor OTEL_EXPORTER_OTLP_INSECURE=true for the http exporter, or add a Copilot-specific COPILOT_OTEL_ALLOW_INSECURE=true / settings toggle, so a user who knowingly targets a loopback collector can export without TLS or the file-exporter indirection. Keep the secure behavior (disabled on http) as the default — the ask is a documented opt-in, not a default change.

Benefit: restores the standard local-observability workflow (a loopback OTLP collector on :4318, which every other OTLP producer supports out of the box) for CLI users, removing the need to either stand up TLS for a localhost endpoint or route through the file exporter.

Example prompts or workflows
  1. OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_EXPORTER_OTLP_INSECURE=true copilot -p "..." → traces/metrics land in a locally-running OpenTelemetry Collector, same as the VS Code extension.
  2. A developer running a local Grafana/Prometheus/Tempo stack (collector on :4318) points both their VS Code Copilot extension and the Copilot CLI at the same loopback endpoint and sees unified gen_ai.* / github.copilot.* telemetry — no per-tool cert setup.
  3. CI or a dev container with an OTLP collector sidecar on localhost captures Copilot CLI GenAI spans without provisioning and distributing TLS certs to every ephemeral environment.
Additional context

Observed on Copilot CLI self-reporting v1.0.80 (macOS, latest update see below); behavior and quoted wording from copilot help monitoring. The VS Code Copilot extension's OTel docs show http://localhost:4318 as the default endpoint with Aspire/Jaeger/Langfuse examples all over plain http and no "http disables export" caveat — so the CLI and extension currently differ on this point.

❯ copilot --version
GitHub Copilot CLI 1.0.80.
Run 'copilot update' to check for updates.
❯ copilot update
Checking for updates...
Checking GitHub for the latest release...
No update needed, current version is 1.0.80, fetched latest release is v1.0.80

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với copilot help monitoring và hành vi của endpoint OTLP/HTTP được mô tả trong issue. Theo dõi cách một endpoint http:// hiện đang vô hiệu hóa việc xuất dữ liệu, sau đó xác định và xác minh opt-in được ghi chép, đồng thời giữ nguyên mặc định an toàn; xác thực bằng một loopback collector sử dụng các biến môi trường ví dụ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
shell
Lĩnh vực
cli, observability
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.