Skip to content

Commit

Permalink
tempo-query: register gRPC health server
Browse files Browse the repository at this point in the history
Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
  • Loading branch information
frzifus committed Oct 11, 2024
1 parent 076c4ef commit eafcfcd
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] Send semver version in api/stattus/buildinfo for cloud deployments [#4110](https://github.com/grafana/tempo/pull/4110) [@Aki0x137]
* [ENHANCEMENT] Speedup tempo-query trace search by allowing parallel queries [#4159](https://github.com/grafana/tempo/pull/4159) (@pavolloffay)
* [CHANGE] tempo-cli: add support for /api/v2/traces endpoint [#4127](https://github.com/grafana/tempo/pull/4127) (@electron0zero)
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 eafcfcd

Please sign in to comment.