Skip to content

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

Closed
@sammerry

Description

@sammerry

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions