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

Method handleTransactionItem

modules/sentry/handler.go:222–238  ·  view source on GitHub ↗

handleTransactionItem processes a "transaction" envelope item.

(item EnvelopeItem)

Source from the content-addressed store, hash-verified

220
221// handleTransactionItem processes a "transaction" envelope item.
222func (h *handler) handleTransactionItem(item EnvelopeItem) (string, json.RawMessage) {
223 var txn Transaction
224 if err := json.Unmarshal(item.Payload, &txn); err != nil {
225 slog.Warn("sentry: failed to parse transaction", "err", err)
226 return "", item.Payload
227 }
228
229 uuid := txn.EventID
230
231 if h.db != nil {
232 if _, err := storeTransaction(h.db, &txn, item.Payload); err != nil {
233 slog.Warn("sentry: failed to store structured transaction", "err", err)
234 }
235 }
236
237 return uuid, item.Payload
238}
239
240// handleSpansItem processes a "spans" envelope item (Span v2 format).
241func (h *handler) handleSpansItem(item EnvelopeItem) {

Callers 1

handleEnvelopeMethod · 0.95

Calls 1

storeTransactionFunction · 0.85

Tested by

no test coverage detected