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

Function isTransaction

modules/sentry/handler.go:361–376  ·  view source on GitHub ↗

isTransaction detects Sentry transaction payloads that should be stored in structured tables but NOT appear in the global event feed. Transactions have spans and start_timestamp but typically no exception data.

(parsed map[string]any)

Source from the content-addressed store, hash-verified

359// in structured tables but NOT appear in the global event feed.
360// Transactions have spans and start_timestamp but typically no exception data.
361func isTransaction(parsed map[string]any) bool {
362 _, hasSpans := parsed["spans"]
363 _, hasStartTS := parsed["start_timestamp"]
364 if !hasSpans || !hasStartTS {
365 return false
366 }
367
368 // If it has exception data, it's an error event with trace context — keep it.
369 if exc, ok := parsed["exception"].(map[string]any); ok {
370 if vals, ok := exc["values"].([]any); ok && len(vals) > 0 {
371 return false
372 }
373 }
374
375 return true
376}
377
378func extractProject(path string) string {
379 parts := strings.Split(strings.Trim(path, "/"), "/")

Callers 1

HandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected