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

Method storeJSONEvent

modules/sentry/handler.go:87–100  ·  view source on GitHub ↗

storeJSONEvent stores a plain JSON error event in structured tables.

(body []byte, project string)

Source from the content-addressed store, hash-verified

85
86// storeJSONEvent stores a plain JSON error event in structured tables.
87func (h *handler) storeJSONEvent(body []byte, project string) {
88 if h.db == nil {
89 return
90 }
91
92 var ev ErrorEvent
93 if err := json.Unmarshal(body, &ev); err != nil {
94 return
95 }
96
97 if _, err := storeErrorEvent(h.db, &ev, body, project); err != nil {
98 slog.Warn("sentry: failed to store structured error event", "err", err)
99 }
100}
101
102// handleEnvelope parses Sentry envelope format and routes each item
103// to the appropriate storage function.

Callers 1

HandleMethod · 0.95

Calls 1

storeErrorEventFunction · 0.85

Tested by

no test coverage detected