sentry

package
v1.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module provides fx options for Sentry

func RegisterHooks

func RegisterHooks(lc fx.Lifecycle, svc *Service)

registerHooks registers lifecycle hooks for Sentry

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewSentryService

func NewSentryService(cfg *config.Configuration, logger *logger.Logger) *Service

NewSentryService creates a new Sentry service

func (*Service) AddBreadcrumb

func (s *Service) AddBreadcrumb(category, message string, data map[string]interface{})

AddBreadcrumb adds a breadcrumb to the current scope

func (*Service) CaptureException

func (s *Service) CaptureException(err error)

CaptureException captures an error in Sentry

func (*Service) Flush

func (s *Service) Flush(timeout uint) bool

Flush waits for queued events to be sent

func (*Service) IsEnabled added in v1.0.17

func (s *Service) IsEnabled() bool

func (*Service) MonitorEventProcessing added in v1.0.17

func (s *Service) MonitorEventProcessing(ctx context.Context, eventName string, eventTimestamp time.Time, metadata map[string]interface{}) (*sentry.Span, context.Context)

MonitorEventProcessing tracks event processing in Sentry

func (*Service) StartClickHouseSpan added in v1.0.17

func (s *Service) StartClickHouseSpan(ctx context.Context, operation string, params map[string]interface{}) (*sentry.Span, context.Context)

StartClickHouseSpan starts a new ClickHouse span in the current transaction

func (*Service) StartDBSpan added in v1.0.17

func (s *Service) StartDBSpan(ctx context.Context, operation string, params map[string]interface{}) (*sentry.Span, context.Context)

StartDBSpan starts a new database span in the current transaction

func (*Service) StartKafkaConsumerSpan added in v1.0.17

func (s *Service) StartKafkaConsumerSpan(ctx context.Context, topic string) (*sentry.Span, context.Context)

StartKafkaConsumerSpan starts a new Kafka consumer span in the current transaction

func (*Service) StartRepositorySpan added in v1.0.17

func (s *Service) StartRepositorySpan(ctx context.Context, repository, operation string, params map[string]interface{}) (*sentry.Span, context.Context)

StartRepositorySpan creates a span for a repository operation

func (*Service) StartTransaction added in v1.0.17

func (s *Service) StartTransaction(ctx context.Context, name string, options ...sentry.SpanOption) (*sentry.Span, context.Context)

StartTransaction creates a new transaction or returns an existing one from context

type SpanFinisher added in v1.0.17

type SpanFinisher struct {
	Span *sentry.Span
}

SpanFinisher is a helper that finishes a span when calling Finish()

func (*SpanFinisher) Finish added in v1.0.17

func (f *SpanFinisher) Finish()

Finish completes the span if it exists

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL