| 8 | ) |
| 9 | |
| 10 | func registerAPI(mux *http.ServeMux, db *sql.DB) { |
| 11 | mux.HandleFunc("GET /api/sentry/exceptions", handleExceptionsList(db)) |
| 12 | mux.HandleFunc("GET /api/sentry/exceptions/{id}", handleExceptionDetail(db)) |
| 13 | mux.HandleFunc("GET /api/sentry/traces", handleTracesList(db)) |
| 14 | mux.HandleFunc("GET /api/sentry/traces/{traceId}", handleTraceDetail(db)) |
| 15 | mux.HandleFunc("GET /api/sentry/logs", handleLogsList(db)) |
| 16 | mux.HandleFunc("GET /api/sentry/service-map", handleServiceMap(db)) |
| 17 | mux.HandleFunc("GET /api/sentry/counts", handleCounts(db)) |
| 18 | mux.HandleFunc("DELETE /api/sentry/all", handleClearAll(db)) |
| 19 | } |
| 20 | |
| 21 | // handleClearAll deletes all data from sentry structured tables. |
| 22 | func handleClearAll(db *sql.DB) http.HandlerFunc { |