MCPcopy Create free account
hub / github.com/buggregator/server / handleCounts

Function handleCounts

modules/sentry/api_service_map.go:133–146  ·  view source on GitHub ↗
(db *sql.DB)

Source from the content-addressed store, hash-verified

131}
132
133func handleCounts(db *sql.DB) http.HandlerFunc {
134 return func(w http.ResponseWriter, r *http.Request) {
135 var exceptions, traces, logs int
136 db.QueryRow(`SELECT COUNT(*) FROM sentry_error_events`).Scan(&exceptions)
137 db.QueryRow(`SELECT COUNT(*) FROM sentry_traces`).Scan(&traces)
138 db.QueryRow(`SELECT COUNT(*) FROM sentry_logs`).Scan(&logs)
139
140 apiJSON(w, map[string]any{
141 "exceptions": exceptions,
142 "traces": traces,
143 "logs": logs,
144 })
145 }
146}

Callers 1

registerAPIFunction · 0.85

Calls 2

apiJSONFunction · 0.85
ScanMethod · 0.80

Tested by

no test coverage detected