-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[exporter/prometheusremotewrite] Disallow configuring compression since snappy is required #37232
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Very strange... The PRW exporter delegates creation of the client, including compression, to the confighttp library: https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp. Mapping from the compression string is really simple, and i'm not sure how it could have been set to snappy... Are you sure your changes are actually being applied? Can you try making unrelated changes to see if that is working? |
Actually, I think I found the issue: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/7b57877bcd1a7f58d4de8760dff084b1061eb583/exporter/prometheusremotewriteexporter/exporter.go#L339C3-L339C47 We are hard-coding content encoding to snappy. |
@jmichalek132 is snappy required? Should we prevent people from setting any other values? |
Looks like snappy is required by the specification: https://prometheus.io/docs/specs/remote_write_spec/ |
We could also simplify the exporter by hard-coding snappy as the compression in the confighttp configuration, and removing our usage of snappy encoding. |
cc @avanish-vaghela |
@dashpole Thanks. Happy to work on it. |
Hi @avanish-vaghela , are you working on it? Let me know, if not I would like to pick this up. Thanks |
Component(s)
exporter/prometheusremotewrite
What happened?
Description
Using prometheusremotewrite to write fails, the corresponding compression type is not supported, and specifying it manually still gives an error. Setting
compression: none
fail as well.Steps to Reproduce
Expected Result
The change in compression type is written to the prometheus instance correctly, as indicated by the error message.
Actual Result
Unable to remotely write to prometheus instance.
Collector version
v0.114.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: