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

fix: add back gzip support for grpc otlp endpoint #11434

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

kruskall
Copy link
Member

@kruskall kruskall commented Aug 20, 2023

Motivation/summary

gzip support was removed in #11072 along with UP code.
_ "google.golang.org/grpc/encoding/gzip" was imported in x-pack/apm-server/profiling/collector.go in the profiling 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

For functional changes, consider:

  • Is it observable through the addition of either logging or metrics?
  • Is its use being published in telemetry to enable product improvement?
  • Have system tests been added to avoid regression?

How to test these changes

Related issues

@kruskall kruskall added backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify labels Aug 20, 2023
@kruskall kruskall requested a review from a team as a code owner August 20, 2023 20:31
Copy link
Member

@axw axw left a 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.

@kruskall kruskall enabled auto-merge (squash) August 21, 2023 01:01
@kruskall kruskall merged commit cfce80b into elastic:main Aug 21, 2023
mergify bot pushed a commit that referenced this pull request Aug 21, 2023
* fix: add back gzip support for grpc otlp endpoint

* changelog: add changelog entry

(cherry picked from commit cfce80b)

# Conflicts:
#	changelogs/head.asciidoc
mergify bot pushed a commit that referenced this pull request Aug 21, 2023
* fix: add back gzip support for grpc otlp endpoint

* changelog: add changelog entry

(cherry picked from commit cfce80b)

# Conflicts:
#	changelogs/head.asciidoc
@kruskall kruskall deleted the fix/grpc-gzip-support branch August 21, 2023 01:51
lahsivjar pushed a commit that referenced this pull request Aug 22, 2023
* fix: add back gzip support for grpc otlp endpoint

* changelog: add changelog entry

(cherry picked from commit cfce80b)

# Conflicts:
#	changelogs/head.asciidoc
lahsivjar pushed a commit that referenced this pull request Aug 22, 2023
mergify bot added a commit that referenced this pull request Aug 22, 2023
) (#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")))
Copy link
Member

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?

Copy link
Member Author

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

@axw axw self-assigned this Aug 28, 2023
@axw
Copy link
Member

axw commented Aug 28, 2023

Verified with 8.10.0-BC1 using elastic/apm-tools#22

bmorelli25 pushed a commit to bmorelli25/apm-server that referenced this pull request Sep 5, 2023
* fix: add back gzip support for grpc otlp endpoint

* changelog: add changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify test-plan test-plan-ok v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants