Skip to content

Allow otlphttpexporter to export in JSON format #6945

Closed
@songy23

Description

@songy23

Is your feature request related to a problem? Please describe.

Currently the otlphttpexporter only supports exporting data in Binary Protobuf Encoding:

req.Header.Set("Content-Type", "application/x-protobuf")

While the otlp spec and the otlp http receiver support both binary protobuf encoding and JSON encoding. It will be nice to be able to export telemetry data in JSON using the otlphttpexporter.

Describe the solution you'd like

Add a config to otlphttpexporter like:

exporters:
  otlphttp:
    ...
    encoding: [binary_protobuf | json]

And have the corresponding encoder in otlphttpexporter.

Feel free to mark this as duplicated if there's an existing issue on otlphttpexporter json support.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions