Skip to content

Commit

Permalink
fix: add back gzip support for grpc otlp endpoint (#11434)
Browse files Browse the repository at this point in the history
* fix: add back gzip support for grpc otlp endpoint

* changelog: add changelog entry

(cherry picked from commit cfce80b)

# Conflicts:
#	changelogs/head.asciidoc
  • Loading branch information
kruskall authored and lahsivjar committed Aug 22, 2023
1 parent 1a25def commit 3b56200
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
20 changes: 20 additions & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[release-notes-head]]
== APM version HEAD

https://github.com/elastic/apm-server/compare/8.10\...main[View commits]

[float]
==== Breaking Changes

[float]
==== Deprecations

[float]
==== Bug fixes
- Add back gzip support for grpc otlp endpoint {pull}11434[11434]

[float]
==== Intake API Changes

[float]
==== Added
1 change: 1 addition & 0 deletions internal/beater/beater.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"golang.org/x/sync/errgroup"
"golang.org/x/sync/semaphore"
"google.golang.org/grpc"
_ "google.golang.org/grpc/encoding/gzip"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/esleg/eslegclient"
Expand Down
4 changes: 2 additions & 2 deletions systemtest/otlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
require.NoError(t, err)
defer conn.Close()
metricsClient := pmetricotlp.NewGRPCClient(conn)
Expand Down Expand Up @@ -238,7 +238,7 @@ func TestOTLPGRPCLogs(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

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")))
require.NoError(t, err)
defer conn.Close()

Expand Down

0 comments on commit 3b56200

Please sign in to comment.