Autoconfiguration rejects OTEL_EXPORTER_OTLP_PROTOCOL=http/json
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- observability-sre
Hướng nghiên cứu
Đọc opentelemetry/sdk/_configuration/__init__.py, đặc biệt là _EXPORTER_BY_OTLP_PROTOCOL, và tái hiện lỗi với OTEL_EXPORTER_OTLP_PROTOCOL=http/json và OTEL_TRACES_EXPORTER=otlp. Thêm ánh xạ http/json vào exporter otlp_json_http hiện có và tìm các bài kiểm thử cấu hình SDK cho việc chọn giao thức OTLP. Hoàn thành nghĩa là traces, metrics và logs sử dụng exporter JSON HTTP thay vì phát sinh lỗi giao thức không được hỗ trợ, kèm theo kiểm thử hồi quy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe your environment
OS: Debian (python:3.12-slim container)
Python version: 3.12
SDK version: 1.45.2
API version: 1.45.2
opentelemetry-distro 0.66b2, opentelemetry-exporter-otlp-json-http 0.66b2
Also checked on main (817f6d2): same table.
What happened?
http/json is one of the three values the spec allows for OTEL_EXPORTER_OTLP_PROTOCOL, and since #5374 there's an exporter for it (opentelemetry-exporter-otlp-json-http, registered as otlp_json_http for traces, metrics and logs). But _EXPORTER_BY_OTLP_PROTOCOL in opentelemetry/sdk/_configuration/__init__.py only knows grpc and http/protobuf, so the default otlp exporter fails at startup and the app runs without telemetry.
Steps to Reproduce
pip install opentelemetry-distro opentelemetry-exporter-otlp-json-http
OTEL_EXPORTER_OTLP_PROTOCOL=http/json OTEL_TRACES_EXPORTER=otlp
opentelemetry-instrument python -c "print('ok')"
Expected Result
The otlp_json_http exporter is picked, same as http/protobuf picks otlp_proto_http.
Actual Result
RuntimeError: Unsupported OTLP protocol 'http/json' is configured
Additional context
Workaround: OTEL_TRACES_EXPORTER=otlp_json_http. Mapping http/json to otlp_json_http in that table fixes it for all three signals.
Would you like to implement a fix?
Yes
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
- Ngôn ngữ chính
- Python
- Star
- 2.7k
- Fork
- 1.1k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-telemetry/opentelemetry-python
-
References to Archived open-telemetry/otepsCó thể đã có người làm @RjyavardhanSingh đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-telemetry/opentelemetry-python#5984 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
MeterProvider raises ValueError on empty or uppercase OTEL_METRICS_EXEMPLAR_FILTERCó thể đã có người làm @bishalde đã nhận 8 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
open-telemetry/opentelemetry-python#5948 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagateCó thể đã có người làm @codedbyadiiii đã nhận 20 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
open-telemetry/opentelemetry-python#5913 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
open-telemetry/opentelemetry-python#5891 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Prometheus map_unit incorrectly normalizes percent ratio units such as %/sCó thể đã có người làm @knowprasad đã nhận 22 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
open-telemetry/opentelemetry-python#5875 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của open-telemetry/opentelemetry-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug improve content
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
opensafely/documentation#2102 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
difficulty:1 documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MakazhanAlpamys/Soup#3533 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
onyx-dot-app/onyx#18730 ·
Maintainer thường phản hồi trong vòng 1 ngày