MCPcopy
hub / github.com/grafana/tempo / buildinfoHandler

Method buildinfoHandler

cmd/tempo/app/app.go:550–562  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

548}
549
550func (t *App) buildinfoHandler() http.HandlerFunc {
551 return func(w http.ResponseWriter, r *http.Request) {
552 w.Header().Set("Content-Type", "application/json")
553 err := json.NewEncoder(w).Encode(build.GetVersion())
554
555 if err != nil {
556 http.Error(w, err.Error(), http.StatusInternalServerError)
557 level.Error(log.Logger).Log("msg", "error writing response", "err", err)
558 } else {
559 w.WriteHeader(http.StatusOK)
560 }
561 }
562}

Callers 1

RunMethod · 0.95

Calls 7

SetMethod · 0.65
EncodeMethod · 0.65
ErrorMethod · 0.65
LogMethod · 0.65
HeaderMethod · 0.45
GetVersionMethod · 0.45
WriteHeaderMethod · 0.45

Tested by

no test coverage detected