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

Drop all unsupported Prometheus values written to the remote write endpoint #12813

Merged
merged 1 commit into from
Mar 25, 2019

Conversation

e-dard
Copy link
Contributor

@e-dard e-dard commented Mar 21, 2019

Fixes #10490.

This PR extends the Prometheus remote write endpoint to drop
unsupported Prometheus values, rather than reject the entire batch.

InfluxDB does not support NaN, -Inf or +Inf, but Prometheus does. The
remote write endpoint will now drop these and write valid values in the
provided batch.

If the user enabled write trace logging ([http] write-tracing = true)
then summaries of any dropped values within a batch will be logged.

If a batch of values contains any values that are subsequently dropped,
the returned status code will be 204.

/cc @stevebang we should edit https://docs.influxdata.com/influxdb/v1.7/supported_protocols/prometheus/#how-prometheus-metrics-are-parsed-in-influxdb so that it explains what happens if NaN, Inf or -Inf are written to InfluxDB via the Prometheus remote write endpoint.

This commit extends the Prometheus remote write endpoint to drop
unsupported Prometheus values, rather than reject the entire batch.

InfluxDB does not support NaN, -Inf or +Inf, but Prometheus does. The
remote write endpoint will now drop these and write valid values in the
provided batch.

If the user enabled write trace logging (`[http] write-tracing = true`)
then summaries of any dropped values within a batch will be logged.

If a batch of values contains any values that are subsequently dropped,
the returned status code will be `204`.
@e-dard e-dard added this to the 1.8 milestone Mar 21, 2019
@e-dard e-dard requested a review from pauldix March 21, 2019 12:28
Copy link
Contributor

@dgnorton dgnorton left a comment

Choose a reason for hiding this comment

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

LGTM

@stevebang
Copy link

For 1.7.6 release, appended the following to the Prometheus (https://docs.influxdata.com/influxdb/v1.7/supported_protocols/prometheus/#how-prometheus-metrics-are-parsed-in-influxdb):

  • [v1.7.6 and later] Prometheus remote write endpoint drops unsupported Prometheus values (NaN,-Inf, and +Inf) rather than reject the entire batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants