Skip to content

Commit

Permalink
Include metrics for default limits
Browse files Browse the repository at this point in the history
  • Loading branch information
zalegrala committed Nov 9, 2021
1 parent 24a1df0 commit dd82ad8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* [ENHANCEMENT] Expose `upto` parameter on hedged requests for each backend with `hedge_requests_up_to`. [#1085](https://github.com/grafana/tempo/pull/1085) (@joe-elliott)
* [ENHANCEMENT] Jsonnet: add `$._config.namespace` to filter by namespace in cortex metrics [#1098](https://github.com/grafana/tempo/pull/1098) (@mapno)
* [ENHANCEMENT] Include metrics for configured limit overrides: tempo_limits_overrides [#1089](https://github.com/grafana/tempo/pull/1089) (@zalegrala)
* [ENHANCEMENT] Include metrics for configured limit overrides and dfaults: tempo_limits_overrides, tempo_limits_defaults [#1089](https://github.com/grafana/tempo/pull/1089) (@zalegrala)

## v1.2.0 / 2021-11-05
* [CHANGE] **BREAKING CHANGE** Drop support for v0 and v1 blocks. See [1.1 changelog](https://github.com/grafana/tempo/releases/tag/v1.1.0) for details [#919](https://github.com/grafana/tempo/pull/919) (@joe-elliott)
Expand Down
14 changes: 14 additions & 0 deletions modules/overrides/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ var (
Name: "limits_overrides",
Help: "Per-Tenant usage limits",
}, []string{"limit_name", "user"})

metricDefaultsLimits = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "tempo",
Name: "limits_defaults",
Help: "Default usage limits",
}, []string{"limit_name"})
)

// perTenantOverrides represents the overrides config file
Expand Down Expand Up @@ -90,6 +96,14 @@ func NewOverrides(defaults Limits) (*Overrides, error) {
var manager *runtimeconfig.Manager
subservices := []services.Service(nil)

metricDefaultsLimits.WithLabelValues("max_local_traces_per_user").Set(float64(defaults.MaxLocalTracesPerUser))
metricDefaultsLimits.WithLabelValues("max_global_traces_per_user").Set(float64(defaults.MaxGlobalTracesPerUser))
metricDefaultsLimits.WithLabelValues("max_bytes_per_trace").Set(float64(defaults.MaxBytesPerTrace))
metricDefaultsLimits.WithLabelValues("max_search_bytes_per_trace").Set(float64(defaults.MaxSearchBytesPerTrace))
metricDefaultsLimits.WithLabelValues("ingestion_rate_limit_bytes").Set(float64(defaults.IngestionRateLimitBytes))
metricDefaultsLimits.WithLabelValues("ingestion_burst_size_bytes").Set(float64(defaults.IngestionBurstSizeBytes))
metricDefaultsLimits.WithLabelValues("block_retention").Set(float64(defaults.BlockRetention))

if defaults.PerTenantOverrideConfig != "" {
runtimeCfg := runtimeconfig.Config{
LoadPath: defaults.PerTenantOverrideConfig,
Expand Down

0 comments on commit dd82ad8

Please sign in to comment.