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

Consider to use custom MIME types? #1233

Open
bogdandrutu opened this issue Nov 17, 2020 · 6 comments
Open

Consider to use custom MIME types? #1233

bogdandrutu opened this issue Nov 17, 2020 · 6 comments
Labels
spec:protocol Related to the specification/protocol directory triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted

Comments

@bogdandrutu
Copy link
Member

IANA allows to register custom media types https://www.iana.org/assignments/media-types/media-types.xhtml, should we consider to register "application/otlp-json" and "application/otlp-protobuf" for the HTTP request types?

Currently we are using the "Content-Type: application/json" and "Content-Type: application/protobuf" and rely on the "path" to determine the context format, this is a classic and good way to design a protocol.

The main downside is that multiplexing on the same path different "formats" is impossible (heard from a "friend"), so by registering our own types we can allow users to multiplex traffic on the same endpoint.

@bogdandrutu bogdandrutu added the spec:protocol Related to the specification/protocol directory label Nov 17, 2020
@tigrannajaryan
Copy link
Member

The main downside is that multiplexing on the same path different "formats" is impossible (heard from a "friend"), so by registering our own types we can allow users to multiplex traffic on the same endpoint.

This is true if we for example decide to support 2 different JSON formats or 2 different Protobuf formats on the same path. Presumably it could be a way to support future incompatible OTLP2 format on the same path. I am not sure whether this is necessary or we just use different paths to differentiate incompatible formats.

@andrewhsu andrewhsu added priority:p2 Medium priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs area:miscellaneous For issues that don't match any other area label labels Nov 20, 2020
@andrewhsu
Copy link
Member

@tigrannajaryan from the issue triage mtg today, setting priority to p2 but feel free to update.

@jmacd
Copy link
Contributor

jmacd commented Nov 20, 2020

Independently, I wonder if we've considered putting some information such as telemetry.sdk.{name,version} into HTTP or gRPC headers, which would allow us to route traffic based on OTLP version in case of bugs we discover in the future that are not intentional changes of protocol/version?

@anuraaga
Copy link
Contributor

I'd recommend not using custom formats - as @tigrannajaryan says, for our current two formats the current mime types work great. If they stop working then it may be time to consider but not now since it seems to fit better with the ecosystem - I know Armeria definitely supports the current types out of the box and believe grpc-gateway does too, though admittedly haven't used the latter.

@breedx-splk
Copy link
Contributor

Resurrecting an old issue here....surprised that we hadn't ever hashed this one out. I was looking at the Content-type for an OTLP HTTP request from Java instrumentation today and saw Content-Type: application/x-protobuf. I was a little surprised that we hadn't settled on a way yet for a receiver to know that the protobuf in question contains OTLP data, and which version of OTLP data it conforms to.

One idea is to simply append a parameter (part of the mime type rfc)-- something like Content-Type: application/x-protobuf;otlp=1.1.0. This would allow receivers to potentially route or drop or parse based on the additional parameter.

@tigrannajaryan
Copy link
Member

The version was proposed but didn't make past the proposal.

As for mime type this likely was not done because the need / use case was never clarified.

This would need an OTEP with justification to be added.

@austinlparker austinlparker added triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted and removed priority:p2 Medium priority level release:allowed-for-ga Editorial changes that can still be added before GA since they don't require action by SIGs area:miscellaneous For issues that don't match any other area label labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:protocol Related to the specification/protocol directory triage:deciding:community-feedback Open to community discussion. If the community can provide sufficient reasoning, it may be accepted
Projects
None yet
Development

No branches or pull requests

7 participants