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

Configure prometheus receiver garbage collection interval #4756

Closed
courageJ opened this issue Jun 30, 2021 · 8 comments · Fixed by #7053
Closed

Configure prometheus receiver garbage collection interval #4756

courageJ opened this issue Jun 30, 2021 · 8 comments · Fixed by #7053
Labels
comp:prometheus Prometheus related issues

Comments

@courageJ
Copy link

Is your feature request related to a problem? Please describe.
For prometheus receivers which disable UseStartTimeMetric to scrape endpoints sampling metrics every 2+ minutes, the timeseries are always reset as the initial, and no metrics will be passed to nextConsumer.

Describe the solution you'd like
Provide an option in prometheus receiver to configure the gc interval

@courageJ
Copy link
Author

@dashpole For visibility

@dashpole
Copy link
Contributor

open-telemetry/opentelemetry-collector#3047 might have changed this behavior recently.

@courageJ
Copy link
Author

courageJ commented Jul 2, 2021

With open-telemetry/opentelemetry-collector#3047, the first timeseries will not be dropped. The remaining issue is for metrics scraped every 2+ minutes, the starttime is always adjusted even if the process is not restarted.

@dashpole
Copy link
Contributor

dashpole commented Jul 2, 2021

Should the garbage collection interval be based on the scrape interval?

@rakyll
Copy link
Contributor

rakyll commented Jul 8, 2021

If we decide to do anything here, we shouldn't do it in the Prometheus receiver.

@tigrannajaryan @mxiamxia Maybe this is another case for merging the ballast extension + memory limiter. Then, we can add gc tuning options. It seems like we need a global memory management component.

@Aneurysm9
Copy link
Member

If we decide to do anything here, we shouldn't do it in the Prometheus receiver.

@tigrannajaryan @mxiamxia Maybe this is another case for merging the ballast extension + memory limiter. Then, we can add gc tuning options. It seems like we need a global memory management component.

I think this is referring to the GC implemented inside the prometheus receiver for the data used to determine start times.

Should the garbage collection interval be based on the scrape interval?

The scrape interval can be set per-job, right? There is only one GC interval that cleans the JobMap for all jobs. Maybe it could be set to the max scrape interval.

@dashpole
Copy link
Contributor

dashpole commented Jul 9, 2021

Maybe it could be set to the max scrape interval.

Yeah, thats what I had in mind.

@rakyll
Copy link
Contributor

rakyll commented Jul 9, 2021

@Aneurysm9 My bad, thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:prometheus Prometheus related issues
Projects
None yet
5 participants