-
Notifications
You must be signed in to change notification settings - Fork 821
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
Support gzip compression for node exporter collector #2337
Merged
dyladan
merged 10 commits into
open-telemetry:main
from
alisabzevari:gzip-compression-collector-exporter
Jul 27, 2021
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c358a65
feat(exporter-collector): support gzip compression for node exporter …
alisabzevari 62a34ee
feat(exporter-collector-proto): support gzip compression
alisabzevari ec88f76
fix(exporter-collector): node8 compatibility fix for exporter gzip co…
alisabzevari 446c71b
feat(exporter-collector): change compression config to enum
alisabzevari 6bceae0
refactor(exporter-collector): use compression config from collector i…
alisabzevari 8805cea
fix(exporter-collector): set content-encoding header only when compre…
alisabzevari 020f775
fix(exporter-collector-proto): fix test for collector when compressio…
alisabzevari 11936ef
Merge branch 'main' into gzip-compression-collector-exporter
obecny 6d8aa31
Merge branch 'main' into gzip-compression-collector-exporter
dyladan 3863d48
Merge branch 'main' into gzip-compression-collector-exporter
dyladan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
General comment, why define the enum values as strings?
Why not just a numeric value as the "NAME" will still be available is the resulting code and if required we can always look it up in config via uppercasing ... Just a thought.
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.
Generally i advise using string to avoid problem when trying to update available value (that can share the same number even if values are different across versions)
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.
as far as I know normal enums are hard to use for non typescript users.
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.
@Flarna I know that's true for
const enum
s but I'm not sure it's the case for regular enums. Do you have a particular case you're thinking of?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.
I think I know what you mean after thinking a little more. You're not thinking they can't do
CompressionAlgorithm.GZIP
but that1
doesn't mean anything to them and passing a string'gzip'
is more clear?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.
Normal enums are exported as objects so a JS user can use
CompressionAlgorithm.GZIP
. A JS user can also use the underlying constant (e.g.gzip
).The main difference is documentation. A typescript user can't to much wrong as editor will tell the allowed values to use and compiler checks again.
For JS users it's needed to document that an object named
CompressionAlgorithm
is exported incl. the properties (GZIP
andNONE
) referring to the constants to use.This works fine but often JS APIs document the actual values to use instead referring to an object holding the constants (would be
gzip
/none
here).Standard const enums are really bad as JS users have to use the numeric values then.
const enums with strings as values would require JS users to use these strings in their code.