Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from Jan 19, 2024

Conversation

kvrhdn
Copy link
Member

@kvrhdn kvrhdn commented Dec 18, 2023

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]

@kvrhdn kvrhdn changed the title Kvrhdn/management api for overrides Add /status/overrides/{tenant} endpoint Dec 18, 2023
cmd/tempo/app/app.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zalegrala zalegrala left a comment

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?

@kvrhdn
Copy link
Member Author

kvrhdn commented Jan 17, 2024

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

@kvrhdn kvrhdn enabled auto-merge (squash) January 19, 2024 15:58
@kvrhdn kvrhdn merged commit 552934f into grafana:main Jan 19, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants