Skip to content

Commit

Permalink
tempo-query: register gRPC health server (grafana#4178)
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
Co-authored-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
frzifus and joe-elliott authored Oct 15, 2024
1 parent 327c964 commit 4726342
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## main / unreleased

* [ENHANCEMENT] Register gRPC health server to tempo-query [#4178](https://github.com/grafana/tempo/pull/4178) (@frzifus)
* [ENHANCEMENT] Support Tempo on IBM s390x [#4172](https://github.com/grafana/tempo/pull/4175) (@pavolloffay)
* [ENHANCEMENT] Changed log level from INFO to DEBUG for the TempoDB Find operation using traceId to reduce excessive/unwanted logs in log search. [#4179](https://github.com/grafana/tempo/pull/4179) (@Aki0x137)
* [ENHANCEMENT] tempo-query: separate tls settings for server and client [#4177](https://github.com/grafana/tempo/pull/4177) (@frzifus)
Expand Down
6 changes: 6 additions & 0 deletions cmd/tempo-query/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"go.uber.org/zap/zapcore"
google_grpc "google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"

"github.com/grafana/tempo/cmd/tempo-query/tempo"
)
Expand Down Expand Up @@ -72,6 +74,10 @@ func main() {
storage_v1.RegisterDependenciesReaderPluginServer(srv, backend)
storage_v1.RegisterSpanWriterPluginServer(srv, backend)

healthServer := health.NewServer()
grpc_health_v1.RegisterHealthServer(srv, healthServer)
healthServer.SetServingStatus("", grpc_health_v1.HealthCheckResponse_SERVING)

lis, err := net.Listen("tcp", cfg.Address)
if err != nil {
logger.Error("failed to listen", zap.Error(err))
Expand Down

0 comments on commit 4726342

Please sign in to comment.