Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

support per-org metrics_active for scraping by prometheus#1160

Merged
Dieterbe merged 3 commits intomasterfrom
perOrgActiveMetrics
Dec 14, 2018
Merged

support per-org metrics_active for scraping by prometheus#1160
Dieterbe merged 3 commits intomasterfrom
perOrgActiveMetrics

Conversation

@woodsaj
Copy link
Copy Markdown
Contributor

@woodsaj woodsaj commented Dec 3, 2018

closes #1159

@woodsaj woodsaj requested review from Dieterbe and jtlisi December 3, 2018 10:08
Copy link
Copy Markdown
Contributor

@Dieterbe Dieterbe left a comment

Choose a reason for hiding this comment

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

to be clear, we have 3 places where we track active metrics:

  1. idx.metrics_active (carbon)
  2. tank.metrics_active (carbon)
  3. metrics_active (prometheus) ("tank" implied)

only 3 is changing, not 1/2. so please update PR title and/or description

Also, we should get a sense for any performance impact of this change.
for the ingest path:
BenchmarkProcessMetricDataSameMetric
BenchmarkProcessMetricDataUniqueMetrics
these exercise AggMetrics.GetOrCreate(). we currently don't have benchmarks for AggMetrics.Get() (which is exercised for render/getData queries) but I imagine the Get() call only plays a very minor role in it, same for the role of GetOrCreate in the benchmarks mentioned above, but why not measure them anyway to be sure.

we don't have benchmarks for AggMetrics.GC(). the changes would only play a minor role and we don't really care how long the operation runs, as long as the write locks aren't worse, which is the case here.

@woodsaj
Copy link
Copy Markdown
Contributor Author

woodsaj commented Dec 14, 2018

no noticeable change in benchmark performance. The +/- 2% is due to my desktop doing other things.

$ benchcmp master.txt perOrgActiveMetrics.txt
benchmark                                     old ns/op     new ns/op     delta
BenchmarkProcessMetricDataUniqueMetrics-4     35.1          34.4          -1.99%
BenchmarkProcessMetricDataSameMetric-4        34.4          34.8          +1.16%

benchmark                                     old allocs     new allocs     delta
BenchmarkProcessMetricDataUniqueMetrics-4     0              0              +0.00%
BenchmarkProcessMetricDataSameMetric-4        0              0              +0.00%

benchmark                                     old bytes     new bytes     delta
BenchmarkProcessMetricDataUniqueMetrics-4     0             0             +0.00%
BenchmarkProcessMetricDataSameMetric-4        0             0             +0.00%

@woodsaj woodsaj changed the title support per-org accounting of activeMetrics support per-org metrics_active for scraping by prometheus Dec 14, 2018
@Dieterbe Dieterbe merged commit 8d7e53e into master Dec 14, 2018
@Dieterbe Dieterbe added this to the 0.11.0 milestone Dec 14, 2018
@woodsaj woodsaj deleted the perOrgActiveMetrics branch December 14, 2018 11:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose per org/instanceId active_series count

2 participants