Skip to content

Add /status/overrides/{tenant} endpoint - #3244

Merged
yvrhdn merged 7 commits into
grafana:mainfrom
yvrhdn:kvrhdn/management-api-for-overrides
Jan 19, 2024
Merged

Add /status/overrides/{tenant} endpoint#3244
yvrhdn merged 7 commits into
grafana:mainfrom
yvrhdn:kvrhdn/management-api-for-overrides

Conversation

@yvrhdn

@yvrhdn yvrhdn commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

What this PR does:

⚠️ Depends on #3180 to be merged first, I've included some of its changes in here

Adds a new endpoint /status/overrides/{tenant} to fetch the overrides for a tenant.

With user-configurable overrides enabled:

$ curl http://localhost:3200/status/overrides/single-tenant
user_configurable_limits:
  metrics_generator:
    disable_collection: true
    collection_interval:
      duration: 30s
runtime_overrides:
  ingestion:
    rate_strategy: local
    rate_limit_bytes: 15000000
    burst_size_bytes: 20000000
    max_traces_per_user: 10000
  read:
    max_bytes_per_tag_values_query: 5000000
  compaction:
    block_retention: 1d
  metrics_generator:
    processor:
      span_metrics:
        dimensions:
        - foo
    ingestion_time_range_slack: 0s
  global:
    max_bytes_per_trace: 5000000

With user-configurable overrides disabled:

$ curl http://localhost:3200/status/overrides/single-tenant
ingestion:
  rate_strategy: local
  rate_limit_bytes: 15000000
  burst_size_bytes: 20000000
  max_traces_per_user: 10000
read:
  max_bytes_per_tag_values_query: 5000000
compaction:
  block_retention: 1d
metrics_generator:
  processor:
    span_metrics:
      dimensions:
      - foo
  ingestion_time_range_slack: 0s
global:
  max_bytes_per_trace: 5000000

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@yvrhdn yvrhdn changed the title Kvrhdn/management api for overrides Dec 18, 2023
@yvrhdn
yvrhdn force-pushed the kvrhdn/management-api-for-overrides branch from 053151e to 4d10d09 Compare December 18, 2023 18:20
@yvrhdn
yvrhdn marked this pull request as ready for review December 18, 2023 18:20
Comment thread modules/overrides/interface.go
Comment thread cmd/tempo/app/app.go Outdated

@zalegrala zalegrala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks reasonable to me. Would you like to add a test?

@yvrhdn

yvrhdn commented Jan 17, 2024

Copy link
Copy Markdown
Contributor Author

Recent changes:

  • removed the TODO and added /status/overrides as an alias for /status/runtime_config, both will be valid
  • added a test case for getRuntimeOverridesFor
    • this caused a large amount of changes because I needed to expose the prometheus.Registerer as parameter, the runtime config manager uses DefaultRegisterer which caused double registration panics
@yvrhdn
yvrhdn requested a review from electron0zero January 17, 2024 18:22
Koenraad Verheyden added 3 commits January 17, 2024 19:23
# Conflicts:
#	CHANGELOG.md
#	cmd/tempo/app/app.go
@yvrhdn
yvrhdn enabled auto-merge (squash) January 19, 2024 15:58
@yvrhdn
yvrhdn merged commit 552934f into grafana:main Jan 19, 2024
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* Add /status/overrides/{tenant} endpoint

* Add /status/overrides as alias of /status/runtime_config

* Add tests for getRuntimeOverridesFor

* make fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment