feat: add -health flag for Docker healthchecks - #6608
Merged
oleg-kozlyuk-grafana merged 2 commits intoMar 10, 2026
Conversation
Add a -health CLI flag that checks Tempo's /ready endpoint without requiring a config file or shell in the container. This enables native Docker HEALTHCHECK using the Tempo binary itself, which is important since the distroless base image has no shell or curl. Usage: tempo -health [-health.url=http://localhost:3200/ready] Follows the same pattern adopted in Loki (grafana/loki#20590).
antonio-mazzini
requested review from
carles-grafana,
electron0zero,
ie-pham,
javiermolinar,
mapno,
mattdurham,
mdisibio,
oleg-kozlyuk-grafana,
ruslan-mikhailov,
stoewer,
yvrhdn and
zalegrala
as code owners
March 4, 2026 16:04
mdisibio
reviewed
Mar 9, 2026
Contributor
Author
|
Good points, switched to the standard flag package — much cleaner. Also printing the response body now on errors. |
oleg-kozlyuk-grafana
approved these changes
Mar 10, 2026
Contributor
|
LGTM, let's get one more pair of eyes on this and merge if no corrections |
Contributor
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6012dd34db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Contributor
|
Thanks for your contribution @antonio-mazzini! |
1 task
3 tasks
mattdurham
pushed a commit
to mattdurham/tempo
that referenced
this pull request
Jun 18, 2026
* feat: add -health flag for Docker healthchecks Add a -health CLI flag that checks Tempo's /ready endpoint without requiring a shell in the container. This enables native Docker HEALTHCHECK using the Tempo binary itself, which is important since the distroless base image has no shell or curl. Usage: tempo -health [-health.url=http://localhost:3200/ready] Follows the same pattern adopted in Loki (grafana/loki#20590). * refactor: use standard flag package for health check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds a
-healthCLI flag to the Tempo binary that checks the/readyendpoint, enabling native DockerHEALTHCHECKwithout requiring a shell, curl, or wget in the container.This is important because Tempo uses
gcr.io/distroless/static-debian12as its base image, which has no shell or network tools.Usage
Custom URL:
How it works
-healthflag is checked before any config parsing, so it works without a config filehttp://localhost:3200/ready(default) with a 5s timeoutReference
Follows the same pattern adopted in Loki: grafana/loki#20590
Closes #6536