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

IS there any plan to send JSON with http proto? #2104

Closed
sammerry opened this issue Sep 8, 2021 · 1 comment
Closed

IS there any plan to send JSON with http proto? #2104

sammerry opened this issue Sep 8, 2021 · 1 comment

Comments

@sammerry
Copy link

sammerry commented Sep 8, 2021

Is your feature request related to a problem?
No

Describe the solution you'd like
I'd like to send json formatted http otlp events. It currently defaults to the form encoded request outlined in the requests docs. Can we set the request format via environment variables?

Additional context
The default requests post sends form encoded data. In order to support json the python http client would need the following change.

self.session.post("http://somewhere.org/endpoint", data=json.dumps(data))

https://github.com/open-telemetry/opentelemetry-python/blob/main/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py#L102

@codeboten
Copy link
Contributor

@sammerry there's another issue opened for this work: #1003. We just haven't had time to get around to implementing it yet, would love a PR if you have time for it though!

@sammerry sammerry closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants