MCPcopy Create free account
hub / github.com/InferCore/InferCore / metrics

Method metrics

internal/server/server.go:332–342  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

330}
331
332func (s *Server) metrics(w http.ResponseWriter, r *http.Request) {
333 if !s.cfg.Telemetry.MetricsEnabled {
334 w.Header().Set("Content-Type", "text/plain; version=0.0.4")
335 _, _ = fmt.Fprintln(w, "# infercore metrics disabled by telemetry.metrics_enabled=false")
336 return
337 }
338
339 promhttp.HandlerFor(s.promReg, promhttp.HandlerOpts{
340 EnableOpenMetrics: false,
341 }).ServeHTTP(w, r)
342}
343
344func (s *Server) infer(w http.ResponseWriter, r *http.Request) {
345 traceID := traceutil.NewTraceID()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected