-
Notifications
You must be signed in to change notification settings - Fork 183
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
Content-Type for Zipkin Protobuf should be application/x-protobuf. #2101
Conversation
Motivation: Zipkin receiver expects Content-Type of application/x-protobuf. Why is this change being made? Correct Content-Type is needed for receivers to correctly identity the payload format. Modifications: - HttpReporter's PROTO_CONTENT_TYPE is updated. Result: When using Codec.PROTO3, the outbound request to the trace collector will have the correct Content-Type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @saturnism, good catch!
Just for the history of this PR, consider adding references to where you found it out.
@@ -69,7 +69,7 @@ | |||
static final String V1_PATH = "/api/v1/spans"; | |||
static final String V2_PATH = "/api/v2/spans"; | |||
static final CharSequence THRIFT_CONTENT_TYPE = newAsciiString("application/x-thrift"); | |||
static final CharSequence PROTO_CONTENT_TYPE = newAsciiString("application/protobuf"); | |||
static final CharSequence PROTO_CONTENT_TYPE = newAsciiString("application/x-protobuf"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider enhancing HttpReporterTest#verifyRequest
(btw, while you are there, please make that method static
) to also validate content-type.
References to Zipkin and OpenTelemetry that require |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saturnism we are planning to release today, I'm going to pull this in and we can enhance tests in a follow-up. Thank you for the great catch!
…2101) Motivation: Zipkin receiver expects Content-Type of `application/x-protobuf`. Why is this change being made? Correct Content-Type is needed for receivers to correctly identity the payload format. Modifications: - HttpReporter's `PROTO_CONTENT_TYPE` is updated. Result: When using `Codec.PROTO3`, the outbound request to the trace collector will have the correct Content-Type.
Motivation:
Zipkin receiver expects Content-Type of application/x-protobuf.
Why is this change being made?
Correct Content-Type is needed for receivers to correctly identity the payload format.
Modifications:
Result:
When using Codec.PROTO3, the outbound request to the trace collector will have the correct Content-Type.