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

Remove queue from the Prometheus remote write #2951

Merged
merged 4 commits into from
Apr 19, 2021
Merged

Remove queue from the Prometheus remote write #2951

merged 4 commits into from
Apr 19, 2021

Conversation

rakyll
Copy link
Contributor

@rakyll rakyll commented Apr 16, 2021

Prometheus remote write (PWR) exporter is supporting queued retry
out of the box, but due to the strict requirements of PWR, the queue
causes "out of order sample" errors. The queue won't be suitable
for Prometheus unless it has a way to shard the data by timeseries.

This is not going to break the existing users because if they have
this feature enabled, they already can't use the PRW exporter correctly.

Fixes #2949.

Prometheus remote write (PWR) exporter is supporting queued retry
out of the box, but due to the strict requirements of PWR, the queue
causes "out of order sample" errors. The queue won't be suitable
for Prometheus unless it has a way to shard the data by timeseries.

Fixes #2949.
@rakyll rakyll requested a review from a team April 16, 2021 18:40
@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #2951 (9d12db2) into main (e72553a) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2951      +/-   ##
==========================================
- Coverage   91.68%   91.68%   -0.01%     
==========================================
  Files         312      312              
  Lines       15339    15337       -2     
==========================================
- Hits        14063    14061       -2     
  Misses        870      870              
  Partials      406      406              
Impacted Files Coverage Δ
exporter/prometheusremotewriteexporter/factory.go 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e72553a...9d12db2. Read the comment docs.

@rakyll
Copy link
Contributor Author

rakyll commented Apr 16, 2021

cc @odeke-em

Copy link
Member

@odeke-em odeke-em left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @rakyll! I added a suggestion but also would be nice to add the issue you filed, as a reference to the code comments. Thank you.

exporter/prometheusremotewriteexporter/README.md Outdated Show resolved Hide resolved
@odeke-em
Copy link
Member

Kindly cc-ing @bogdandrutu!

@rakyll
Copy link
Contributor Author

rakyll commented Apr 16, 2021

Added a link to the issue, thanks for the suggestion @odeke-em.

@odeke-em
Copy link
Member

Nice, thank you @rakyll! LGTM.

@tigrannajaryan
Copy link
Member

Can we instead force queued_retry to have a single consumer for this exporter? That should fix the problem while keeping the retrying and queuing capabilities, right? I am not sure how important is that for this exporter though.

@rakyll
Copy link
Contributor Author

rakyll commented Apr 19, 2021

@tigrannajaryan Retrying is critical in the context of remote write, it's not easy to have a highly available Prometheus, Cortex or Thanos. We want to reimplement the retrying options Prometheus server implements natively (https://prometheus.io/docs/practices/remote_write/) to provide a drop-in replacement and help users to reuse their fine tuned configuration.

@tigrannajaryan
Copy link
Member

@tigrannajaryan Retrying is critical in the context of remote write, it's not easy to have a highly available Prometheus, Cortex or Thanos. We want to reimplement the retrying options Prometheus server implements natively (https://prometheus.io/docs/practices/remote_write/) to provide a drop-in replacement and help users to reuse their fine tuned configuration.

Sounds good. Do you also want to add a TODO or an issue (if it does not already exist) describing what you plan to do?

@tigrannajaryan tigrannajaryan merged commit 51412b3 into open-telemetry:main Apr 19, 2021
@rakyll
Copy link
Contributor Author

rakyll commented Apr 19, 2021

I updated https://github.com/open-telemetry/opentelemetry-collector/issues/2259 to make sure we're following up with the necessary changes. Thanks much.

@rakyll rakyll deleted the prom-debug branch April 19, 2021 18:53
bogdandrutu pushed a commit that referenced this pull request Apr 21, 2021
…2974)

* Enable queue for the Prometheus Remote Write Exporter internally

This is a follow up to #2951.

When we disable the queue completely, it causes the export to happen
not in a consumer goroutine. Enable the queue internally that export
gets its own goroutine not to block the entire collector pipeline.

* Set a default queue size
bogdandrutu pushed a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Apr 21, 2021
* Remove sending_queue from AWS Prometheus Remote Write Exporter

This is a follow up of open-telemetry/opentelemetry-collector#2951.

Fixes #3163.

* Fix the test
pmatyjasek-sumo pushed a commit to pmatyjasek-sumo/opentelemetry-collector-contrib that referenced this pull request Apr 28, 2021
…telemetry#3186)

* Remove sending_queue from AWS Prometheus Remote Write Exporter

This is a follow up of open-telemetry/opentelemetry-collector#2951.

Fixes open-telemetry#3163.

* Fix the test
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
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.

Queued Retry is incompatible with Prometheus Remote Write
3 participants