diff --git a/CHANGELOG.md b/CHANGELOG.md index cb35db20a48..02b78ee8802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ * [FEATURE] metrics-generator: support per-tenant processor configuration [#1434](https://github.com/grafana/tempo/pull/1434) (@kvrhdn) * [FEATURE] Include rollout dashboard [#1456](https://github.com/grafana/tempo/pull/1456) (@zalegrala) * [ENHANCEMENT] Added the ability to have a per tenant max search duration. [#1421](https://github.com/grafana/tempo/pull/1421) (@joe-elliott) +* [ENHANCEMENT] Azure Backend: Add support for authentication with Managed Identities. [#1457](https://github.com/grafana/tempo/pull/1457) (@joe-elliott) +* [ENHANCEMENT] metrics-generator: expose max_active_series as a metric [#1471](https://github.com/grafana/tempo/pull/1471) (@kvrhdn) * [BUGFIX] Fix nil pointer panic when the trace by id path errors. [#1441](https://github.com/grafana/tempo/pull/1441) (@joe-elliott) -* [ENHANCEMENT] Azure Backend: Add support for authentication with Managed Identities. ## v1.4.1 / 2022-05-05 diff --git a/integration/e2e/config-metrics-generator.yaml b/integration/e2e/config-metrics-generator.yaml index 9791f7498e2..d695f6fc60a 100644 --- a/integration/e2e/config-metrics-generator.yaml +++ b/integration/e2e/config-metrics-generator.yaml @@ -43,4 +43,5 @@ memberlist: - tempo_e2e-metrics-generator:7946 overrides: - metrics_generator_processors: [service-graphs, span-metrics] \ No newline at end of file + metrics_generator_processors: [service-graphs, span-metrics] + metrics_generator_max_active_series: 1000 \ No newline at end of file diff --git a/integration/e2e/metrics_generator_test.go b/integration/e2e/metrics_generator_test.go index a4c723e7ce0..2b82ddeab9e 100644 --- a/integration/e2e/metrics_generator_test.go +++ b/integration/e2e/metrics_generator_test.go @@ -156,6 +156,7 @@ func TestMetricsGenerator(t *testing.T) { assert.NoError(t, tempoMetricsGenerator.WaitSumMetrics(e2e.Equals(2), "tempo_metrics_generator_spans_received_total")) assert.NoError(t, tempoMetricsGenerator.WaitSumMetrics(e2e.Equals(23), "tempo_metrics_generator_registry_active_series")) + assert.NoError(t, tempoMetricsGenerator.WaitSumMetrics(e2e.Equals(1000), "tempo_metrics_generator_registry_max_active_series")) assert.NoError(t, tempoMetricsGenerator.WaitSumMetrics(e2e.Equals(23), "tempo_metrics_generator_registry_series_added_total")) } diff --git a/modules/generator/registry/registry.go b/modules/generator/registry/registry.go index 390881653b6..a8cad99a017 100644 --- a/modules/generator/registry/registry.go +++ b/modules/generator/registry/registry.go @@ -20,6 +20,11 @@ var ( Name: "metrics_generator_registry_active_series", Help: "The active series per tenant", }, []string{"tenant"}) + metricMaxActiveSeries = promauto.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: "tempo", + Name: "metrics_generator_registry_max_active_series", + Help: "The maximum active series per tenant", + }, []string{"tenant"}) metricTotalSeriesAdded = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: "tempo", Name: "metrics_generator_registry_series_added_total", @@ -63,6 +68,7 @@ type ManagedRegistry struct { logger log.Logger metricActiveSeries prometheus.Gauge + metricMaxActiveSeries prometheus.Gauge metricTotalSeriesAdded prometheus.Counter metricTotalSeriesRemoved prometheus.Counter metricTotalSeriesLimited prometheus.Counter @@ -105,6 +111,7 @@ func New(cfg *Config, overrides Overrides, tenant string, appendable storage.App logger: logger, metricActiveSeries: metricActiveSeries.WithLabelValues(tenant), + metricMaxActiveSeries: metricMaxActiveSeries.WithLabelValues(tenant), metricTotalSeriesAdded: metricTotalSeriesAdded.WithLabelValues(tenant), metricTotalSeriesRemoved: metricTotalSeriesRemoved.WithLabelValues(tenant), metricTotalSeriesLimited: metricTotalSeriesLimited.WithLabelValues(tenant), @@ -196,6 +203,9 @@ func (r *ManagedRegistry) collectMetrics(ctx context.Context) { r.activeSeries.Store(activeSeries) r.metricActiveSeries.Set(float64(activeSeries)) + maxActiveSeries := r.overrides.MetricsGeneratorMaxActiveSeries(r.tenant) + r.metricMaxActiveSeries.Set(float64(maxActiveSeries)) + err = appender.Commit() if err != nil { return