-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for gzip encoded payload in OTLP/HTTP receiver #1581
Conversation
|
Codecov Report
@@ Coverage Diff @@
## master #1581 +/- ##
=======================================
Coverage 91.67% 91.67%
=======================================
Files 261 262 +1
Lines 18540 18617 +77
=======================================
+ Hits 16997 17068 +71
- Misses 1113 1117 +4
- Partials 430 432 +2
Continue to review full report at Codecov.
|
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.
@code-haven thank you for the PR, I left a couple comments/questions.
@code-haven there are few unresolved comments, please ping when everything is resolved :) |
846bee7
to
170780b
Compare
Please rebase :) |
0f9bf7f
to
05ebf79
Compare
@bogdandrutu @tigrannajaryan @jrcamp So I found a way to identify within the marshallers itself if the request has gzipped content by replicating what |
ac48f49
to
be3d607
Compare
@bogdandrutu I've decided to roll back the changes until this comment as I realize I'm complicating things by making changes to this PR without discussion. Sorry for all the confusion :( Wanted to discuss if something like this would work instead of replacing the
|
0d6ec22
to
46173e8
Compare
@code-haven please fix the build. |
32aedb1
to
827cf24
Compare
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.
LGTM, with minor comment.
receiver/otlpreceiver/otlphttp.go
Outdated
fallbackMsg := []byte(`{"code": 13, "message": "failed to marshal error message"}`) | ||
fallbackContentType := "application/json" | ||
|
||
switch statusCode { |
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.
I would use if instead here.
@bogdandrutu do you have any other concerns or I can merge? |
…ry#1581) * Fix validation for tracestate with vendor * Add changes to changelog
Description:
Fixing a bug - OTLP/HTTP receiver does not support gzip. Fixed this by wrapping the HTTP handler generated by grpc-gateway to decompress prior to processing the request, similar to how it's done in
opentelemetry-collector/receiver/zipkinreceiver/trace_receiver.go
Line 208 in c4a3829
Link to tracking Issue:
#1344
Testing:
Modified unit tests to cover cases where request body is compressed via gzip/zlib.