Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Restore /config endpoint and correct handlerFunc for buildinfo #4027

Merged
merged 1 commit into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/sources/api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ These endpoints are exposed by all components:
- [`GET /ready`](#get-ready)
- [`GET /metrics`](#get-metrics)
- [`GET /config`](#get-config)
- [`GET /loki/api/v1/status/buildinfo`](#get-buildinfo)
- [`GET /loki/api/v1/status/buildinfo`](#get-lokiapiv1statusbuildinfo)

These endpoints are exposed by the querier and the frontend:

Expand Down Expand Up @@ -824,12 +824,10 @@ and the current are returned. A value of `defaults` returns the default configur

In microservices mode, the `/config` endpoint is exposed by all components.

## `GET buildinfo`
## `GET /loki/api/v1/status/buildinfo`

`/loki/api/v1/status/buildinfo` exposes the build information in a JSON object. The fields are `version`, `revision`, `branch`, `buildDate`, `buildUser`, and `goVersion`.

In microservices mode, the `/version` endpoint is exposed by all components.

## Series

The Series API is available under the following:
Expand Down
4 changes: 2 additions & 2 deletions pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ func (t *Loki) Run() error {
t.Server.HTTP.Path("/ready").Handler(t.readyHandler(sm))

// This adds a way to see the config and the changes compared to the defaults
t.Server.HTTP.Path("/loki/api/v1/status/buildinfo").HandlerFunc(configHandler(t.Cfg, newDefaultConfig()))
t.Server.HTTP.Path("/config").HandlerFunc(configHandler(t.Cfg, newDefaultConfig()))

// Each component serves its version.
t.Server.HTTP.Path("/version").HandlerFunc(versionHandler())
t.Server.HTTP.Path("/loki/api/v1/status/buildinfo").HandlerFunc(versionHandler())

t.Server.HTTP.Path("/debug/fgprof").Handler(fgprof.Handler())

Expand Down