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

Function writeLimits

modules/overrides/userconfigurable/api/http.go:192–203  ·  view source on GitHub ↗
(w http.ResponseWriter, limits *client.Limits, version backend.Version)

Source from the content-addressed store, hash-verified

190}
191
192func writeLimits(w http.ResponseWriter, limits *client.Limits, version backend.Version) error {
193 data, err := json.Marshal(limits)
194 if err != nil {
195 http.Error(w, err.Error(), http.StatusInternalServerError)
196 return err
197 }
198
199 w.Header().Set(headerEtag, string(version))
200 w.Header().Set(api.HeaderContentType, api.HeaderAcceptJSON)
201 _, _ = w.Write(data)
202 return nil
203}
204
205func (a *UserConfigOverridesAPI) logRequest(ctx context.Context, handler string, r *http.Request) (context.Context, func(*error)) {
206 ctx, span := tracer.Start(ctx, handler)

Callers 2

GetHandlerMethod · 0.85
PatchHandlerMethod · 0.85

Calls 5

MarshalMethod · 0.65
ErrorMethod · 0.65
SetMethod · 0.65
WriteMethod · 0.65
HeaderMethod · 0.45

Tested by

no test coverage detected