Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Support application/json for OTLP #2067

Closed
mikeldking opened this issue Jan 9, 2024 · 2 comments
Closed

[ENHANCEMENT] Support application/json for OTLP #2067

mikeldking opened this issue Jan 9, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mikeldking
Copy link
Contributor

Is your feature request related to a problem? Please describe.
By default some exporters just use JSON instead of protos. Right now we reject these mime types but for ease of use we should allow them.

Example:

{"stack":"OTLPExporterError: Unsupported Media Type\n    at IncomingMessage.<anonymous> (/Users/mikeldking/work/arize/arizeweb/node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.35.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/otlp-exporter-base/src/platform/node/util.ts:89:25)\n    at /Users/mikeldking/work/arize/arizeweb/node_modules/.pnpm/@opentelemetry+context-async-hooks@1.9.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:49\n    at AsyncLocalStorage.run (node:async_hooks:335:14)\n    at AsyncLocalStorageContextManager.with (/Users/mikeldking/work/arize/arizeweb/node_modules/.pnpm/@opentelemetry+context-async-hooks@1.9.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/context-async-hooks/src/AsyncLocalStorageContextManager.ts:40:36)\n    at IncomingMessage.contextWrapper (/Users/mikeldking/work/arize/arizeweb/node_modules/.pnpm/@opentelemetry+context-async-hooks@1.9.0_@opentelemetry+api@1.4.0/node_modules/@opentelemetry/context-async-hooks/src/AbstractAsyncHooksContextManager.ts:75:26)\n    at IncomingMessage.emit (node:events:526:35)\n    at IncomingMessage.emit (node:domain:488:12)\n    at endReadableNT (node:internal/streams/readable:1589:12)\n    at processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"Unsupported Media Type","name":"OTLPExporterError","data":"Unsupported content type: application/json","code":"415"}
``

@mikeldking mikeldking added enhancement New feature or request triage issues that need triage help wanted Extra attention is needed and removed triage issues that need triage labels Jan 9, 2024
@pbadhe
Copy link
Collaborator

pbadhe commented Jan 28, 2024

Hi @mikeldking, can I know some tests related to this and a bit more description of the issue?

@mikeldking
Copy link
Contributor Author

@pbadhe give one of the HTTP OTEL exporters a try (maybe nodejs) with Phoenix. You will notice that if the HTTP exporter uses JSON, phoenix rejects the spans (e.g. the header MIME type will be rejected).

Here's a related ticket in OTEL that might give you a better sense of the scope open-telemetry/opentelemetry-python#1003

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 8, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 15, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Archived in project
Development

No branches or pull requests

2 participants