-
Notifications
You must be signed in to change notification settings - Fork 529
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
fix: add back gzip support for grpc otlp endpoint #11434
Conversation
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, please add a changelog entry.
* fix: add back gzip support for grpc otlp endpoint * changelog: add changelog entry (cherry picked from commit cfce80b) # Conflicts: # changelogs/head.asciidoc
* fix: add back gzip support for grpc otlp endpoint * changelog: add changelog entry (cherry picked from commit cfce80b) # Conflicts: # changelogs/head.asciidoc
* fix: add back gzip support for grpc otlp endpoint * changelog: add changelog entry (cherry picked from commit cfce80b) # Conflicts: # changelogs/head.asciidoc
…1434) (#11436) (cherry picked from commit cfce80b) Co-authored-by: kruskall <[email protected]>
) (#11435) * fix: add back gzip support for grpc otlp endpoint (#11434) * fix: add back gzip support for grpc otlp endpoint * changelog: add changelog entry (cherry picked from commit cfce80b) # Conflicts: # changelogs/head.asciidoc * changelog: delete head changelog --------- Co-authored-by: kruskall <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
@@ -206,7 +206,7 @@ func TestOTLPGRPCMetrics(t *testing.T) { | |||
|
|||
// opentelemetry-go does not support sending Summary metrics, | |||
// so we send them using the lower level OTLP/gRPC client. | |||
conn, err := grpc.Dial(serverAddr(srv), grpc.WithInsecure(), grpc.WithBlock()) | |||
conn, err := grpc.Dial(serverAddr(srv), grpc.WithInsecure(), grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.UseCompressor("gzip"))) |
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.
Could there be a future regression where it's requests without gzip that don't work? Should we also test without gzip enabled?
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.
That's unlikely, other tests are sending uncompressed requests to the grpc endpoint so they would fail
Verified with 8.10.0-BC1 using elastic/apm-tools#22 |
* fix: add back gzip support for grpc otlp endpoint * changelog: add changelog entry
Motivation/summary
gzip support was removed in #11072 along with UP code.
_ "google.golang.org/grpc/encoding/gzip"
was imported inx-pack/apm-server/profiling/collector.go
in theprofiling
package which was imported into the main package, enabling gzip support.This PR adds back the import which runs the
init
function enabling gzip support.The grpc otlp tests have been updated to send gzip request to validate that the feature is working.
The fix is backported to 8.10 and 8.9 and it's related to SDH
#1053
Checklist
apmpackage
have been made)For functional changes, consider:
How to test these changes
Related issues