MCPcopy Create free account
hub / github.com/DataDog/datadog-agent / getPythonStatus

Function getPythonStatus

cmd/agent/api/internal/agent/python_status.go:22–32  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

20)
21
22func getPythonStatus(w http.ResponseWriter, r *http.Request) {
23 w.Header().Set("Content-Type", "application/json")
24 pyStats, err := python.GetPythonInterpreterMemoryUsage()
25 if err != nil {
26 log.Warnf("Error getting python stats: %s\n", err) // or something like this
27 http.Error(w, err.Error(), 500)
28 }
29
30 j, _ := json.Marshal(pyStats)
31 w.Write(j)
32}

Callers 1

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…