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

Add support for compression (gzip and deflate) #58

Merged
merged 2 commits into from
Apr 8, 2020

Conversation

sumo-drosiek
Copy link
Contributor

Copy link
Contributor

@frankreno frankreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@samjsong samjsong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just left one question for my curiosity

desc 'Compress payload'
config_param :compress, :bool, :default => false
desc 'Encoding method of compresssion (either gzip or deflate)'
config_param :compress_encoding, :string, :default => SumologicConnection::COMPRESS_DEFLATE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with these, what was our reason for defaulting to deflate vs gzip?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say consistency with logstash plugin:

https://github.com/SumoLogic/logstash-output-sumologic/blob/master/lib/logstash/outputs/sumologic/compressor.rb

Deflate seems to be more compact (shorter header) and faster.
Gzip includes additional headers and data validation, but uses deflate underneath

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also gzip looks to be preferred by HTTP society

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some research I changed it to gzip. We can always change it back before release

@sumo-drosiek sumo-drosiek force-pushed the drosiek-compression branch from 1b7497d to 9f37538 Compare April 8, 2020 07:40
@sumo-drosiek sumo-drosiek merged commit 79d0142 into master Apr 8, 2020
@sumo-drosiek sumo-drosiek deleted the drosiek-compression branch April 8, 2020 09:10
sumo-drosiek pushed a commit that referenced this pull request Apr 8, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* sumo_client (#59)
* compression (#58)
sumo-drosiek pushed a commit that referenced this pull request Apr 16, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* compression (#58)
sumo-drosiek added a commit that referenced this pull request Apr 22, 2020
* custom_fields (#56)
* cutom_dimensions (#57)
* compression (#58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants