newrelic / newrelic-ruby-agent

New Relic RPM Ruby Agent
https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/introduction-new-relic-ruby/
Apache License 2.0
1.2k stars 599 forks source link

Modernize the approach the agent takes to gzip outbound payloads before sending them to the collector #1570

Open fallwith opened 2 years ago

fallwith commented 2 years ago

We appear to be using what I hypothesize is a fork of an older version of the Zlib gem's gzip compression logic to gzip our outbound payloads.

We should see if we can modernize our approach while retaining compatibility with all supported Ruby versions.

To gzip some data, we should need only to do this:

require 'zlib'
Zlib.gzip(text)

We may be able to replace the module NewRelic::Agent::Encoders::Compressed::Gzip with the code above. It is used in NewRelic::Agent::Service#compress_request_if_needed

Acceptance Criteria

workato-integration[bot] commented 2 years ago

https://issues.newrelic.com/browse/NEWRELIC-4900