Autoconfiguration rejects OTEL_EXPORTER_OTLP_PROTOCOL=http/json
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability-sre
Research direction
Read opentelemetry/sdk/_configuration/__init__.py, especially _EXPORTER_BY_OTLP_PROTOCOL, and reproduce the failure with OTEL_EXPORTER_OTLP_PROTOCOL=http/json and OTEL_TRACES_EXPORTER=otlp. Add the http/json mapping to the existing otlp_json_http exporter and locate the SDK configuration tests for OTLP protocol selection. Done means traces, metrics, and logs use the JSON HTTP exporter instead of raising the unsupported-protocol error, with regression coverage.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from open-telemetry/opentelemetry-python
-
feature-request
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-telemetry/opentelemetry-python#5994 ·
Maintainers usually reply within 2 days
-
References to Archived open-telemetry/otepsPossibly taken @RjyavardhanSingh claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-python#5984 · 1 comment ·
Maintainers usually reply within 2 days
-
MeterProvider raises ValueError on empty or uppercase OTEL_METRICS_EXEMPLAR_FILTERPossibly taken @bishalde claimed this 10 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
open-telemetry/opentelemetry-python#5948 · 3 comments ·
Maintainers usually reply within 2 days
-
W3CBaggagePropagator drops a list-member over 4096 bytes that W3C Baggage requires it to propagatePossibly taken @codedbyadiiii claimed this 22 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-python#5913 ·
Maintainers usually reply within 2 days
-
otel.sdk.processor.{span,log}.queue.capacity uses synchronous UpDownCounter recorded once in __init__May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open-telemetry/opentelemetry-python#5891 ·
Maintainers usually reply within 2 days
All issues in open-telemetry/opentelemetry-python
Similar issues
-
Make the "%" unit spacing the same in the web and in A10Possibly taken @kragent66-glitch claimed this today. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 comment ·
-
ci severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TMHSDigital/Spackle#205 ·
Maintainers usually reply within 1 day
-
pkg:lgm type:chore upstream-gaussx
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jejjohnson/pyrox#610 ·
Maintainers usually reply within 1 day
-
changelog investigate
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ramnes/notion-sdk-py#523 ·
-
good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 78/100