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

Consolidate status information onto /status endpoint #952

Merged
merged 4 commits into from
Sep 15, 2021

Conversation

zalegrala
Copy link
Contributor

@zalegrala zalegrala commented Sep 13, 2021

What this PR does:
Here we move a few status endpoints onto the /status endpoint. Optionally, users can pass a few query parameters that will reduce the amount of output.

Which issue(s) this PR fixes:
Fixes #949

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Generally heading the right way but let's make a few changes as discussed offline:

  1. switch to path based i.e. /status/config instead of /status?config
  2. /status should continue to list everything
  3. at the top of each section in /status list the endpoint that needs to be used to request only that section
  4. add /status/version
  5. order of values in /status should be version, services, endpoints, runtime_config and then config

CHANGELOG.md Outdated
@@ -38,6 +38,7 @@
* [CHANGE] Renamed CLI flag from `--storage.trace.maintenance-cycle` to `--storage.trace.blocklist_poll`. This is a **breaking change** [#897](https://github.com/grafana/tempo/pull/897) (@mritunjaysharma394)
* [CHANGE] update jsonnet alerts and recording rules to use `job_selectors` and `cluster_selectors` for configurable unique identifier labels [#935](https://github.com/grafana/tempo/pull/935) (@kevinschoonover)
* [CHANGE] Modify generated tag keys in Vulture for easier filtering [#934](https://github.com/grafana/tempo/pull/934) (@zalegrala)
* [CHANGE] Consolidate status information onto /status endpoint [ #952 ](https://github.com/grafana/tempo/pull/952) @zalegrala)
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change. We need to list that and also list all the endpoints that moved and where they moved to.

See below for examples.

@joe-elliott
Copy link
Member

See here:
https://github.com/grafana/tempo/blob/main/cmd/tempo/main.go#L67
for an example of how we print the version.

@zalegrala
Copy link
Contributor Author

I've updated the approach here, and I hope it is still pretty readable. I wasn't quite sure about the error handling on that status method, but let me know what you think.

@zalegrala
Copy link
Contributor Author

Oh that might not work due to the linter. Hmm. I'll be less clever.

@joe-elliott joe-elliott merged commit b80ef06 into grafana:main Sep 15, 2021
@zalegrala zalegrala deleted the apiConsolidate branch September 15, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate status API information on /status
2 participants