Skip to content

Commit

Permalink
Ensure /api/status/buildinfo respects http_api_prefix (#2761)
Browse files Browse the repository at this point in the history
  • Loading branch information
yvrhdn authored Aug 4, 2023
1 parent b5f541a commit 2a81c2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/tempo/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"github.com/grafana/tempo/modules/overrides"
"github.com/grafana/tempo/modules/querier"
"github.com/grafana/tempo/modules/storage"
"github.com/grafana/tempo/pkg/api"
"github.com/grafana/tempo/pkg/usagestats"
"github.com/grafana/tempo/pkg/util"
"github.com/grafana/tempo/pkg/util/log"
Expand Down Expand Up @@ -189,7 +190,8 @@ func (t *App) Run() error {
t.InternalServer.HTTP.Path("/ready").Methods("GET").Handler(t.readyHandler(sm))
}

t.Server.HTTP.Path("/api/status/buildinfo").Handler(t.buildinfoHandler()).Methods("GET")
t.Server.HTTP.Path(addHTTPAPIPrefix(&t.cfg, api.PathBuildInfo)).Handler(t.buildinfoHandler()).Methods("GET")

t.Server.HTTP.Path("/ready").Handler(t.readyHandler(sm))
t.Server.HTTP.Path("/status").Handler(t.statusHandler()).Methods("GET")
t.Server.HTTP.Path("/status/{endpoint}").Handler(t.statusHandler()).Methods("GET")
Expand Down
1 change: 1 addition & 0 deletions pkg/api/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const (
PathSearchTags = "/api/search/tags"
PathSearchTagValues = "/api/search/tag/{" + muxVarTagName + "}/values"
PathEcho = "/api/echo"
PathBuildInfo = "/api/status/buildinfo"
PathUsageStats = "/status/usage-stats"
PathSpanMetrics = "/api/metrics"
PathSpanMetricsSummary = "/api/metrics/summary"
Expand Down

0 comments on commit 2a81c2d

Please sign in to comment.