GoogleCloudPlatform / prometheus-engine

Google Cloud Managed Service for Prometheus libraries and manifests.
https://g.co/cloud/managedprometheus
Apache License 2.0
195 stars 93 forks source link

feat: allow updating export options at runtime #974

Closed TheSpiritXIII closed 3 months ago

TheSpiritXIII commented 5 months ago

Pre-req: https://github.com/GoogleCloudPlatform/prometheus-engine/pull/1001

  1. ApplyConfig now takes ExporterOpts, which allows runtime updates.
  2. exporter.New now takes a context and Run no longer does, which means the Exporter uses the same context throughout its lifetime.

These changes allow us to update the metric client at runtime. When a metric client is updated, it may take:

TheSpiritXIII commented 4 months ago

Is there any way this can be separated out?

It already is -- go to the "Files changed" tab and on the top right directly underneath the tabs, there's a drop-down that says "All commits" where you can select which commit to review. Or do you mean you want this change without being rebased on top of the other change?

pintohutch commented 4 months ago

Ah ok - it wasn't clear to me that I should just review that commit.

If that's the case, I think most of my review comments outside of the rule-evaluator ones still apply - thanks for clarifying :)