Add secure connection support to tempo-cli#5692
Merged
electron0zero merged 11 commits intografana:mainfrom Sep 30, 2025
Merged
Conversation
…nd grpc connections
…http and grpc connections
electron0zero
approved these changes
Sep 29, 2025
Contributor
Author
|
I am unsure what do to regarding the linting errors for |
Member
we should migrate to using |
Contributor
Author
|
Alright I've replaced those. |
electron0zero
approved these changes
Sep 30, 2025
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
This PR introduces TLS support for both HTTP and gRPC to tempo-cli query commands, allowing users to connect securely to Tempo instances running with TLS enabled.
Motivation
In production we run Tempo behind a TLS proxy for security. Previously, tempo-cli could only connect using insecure HTTP/gRPC connections, limiting its usefulness in secure environments. This change enables tempo-cli to work with TLS-secured Tempo instances.
Implementation
Added
--secureflag to all tempo-cli query commands:query searchquery search-tagsquery search-tag-valuesquery metrics-query-range(both instant and range queries)New helper functions in
shared.go:httpScheme(secure bool)- Returns "https" or "http" based on secure flaggrpcTransportCredentials(secure bool)- Returns appropriate gRPC transport credentials (TLS or insecure)Implementation Details
--secureis used, HTTP requests usehttps://instead ofhttp://--secureis used, gRPC connections use TLS with system certificate pool instead of insecure credentialsDocumentation Updates
docs/sources/tempo/operations/tempo_cli.mdto document the new--secureflag for all affected commandsHow to test
service/tempo-query-frontend 3200Using a Kubernetes Ingress here
Testing
The implementation has been tested with:
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]