{"modulePath":"github.com/bitechdev/ResolveSpec","version":"v1.3.14","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errortracking\n\n## Types\n\n```go\ntype NoOpProvider struct{}\n```\nNoOpProvider is a no-op implementation of the Provider interface Used when error tracking is disabled\n\n```go\nfunc NewNoOpProvider() *NoOpProvider\n```\nNewNoOpProvider creates a new NoOp provider\n\n```go\nfunc (n *NoOpProvider) CaptureError(ctx context.Context, err error, severity Severity, extra map[string]interface{})\n```\nCaptureError does nothing\n\n```go\nfunc (n *NoOpProvider) CaptureMessage(ctx context.Context, message string, severity Severity, extra map[string]interface{})\n```\nCaptureMessage does nothing\n\n```go\nfunc (n *NoOpProvider) CapturePanic(ctx context.Context, recovered interface{}, stackTrace []byte, extra map[string]interface{})\n```\nCapturePanic does nothing\n\n```go\nfunc (n *NoOpProvider) Close() error\n```\nClose does nothing\n\n```go\nfunc (n *NoOpProvider) Flush(timeout int) bool\n```\nFlush does nothing and returns true\n\n```go\ntype Provider interface {\n\t// CaptureError captures an error with the given severity and additional context\n\tCaptureError(ctx context.Context, err error, severity Severity, extra map[string]interface{})\n\n\t// CaptureMessage captures a message with the given severity and additional context\n\tCaptureMessage(ctx context.Context, message string, severity Severity, extra map[string]interface{})\n\n\t// CapturePanic captures a panic with stack trace\n\tCapturePanic(ctx context.Context, recovered interface{}, stackTrace []byte, extra map[string]interface{})\n\n\t// Flush waits for all events to be sent (useful for graceful shutdown)\n\tFlush(timeout int) bool\n\n\t// Close closes the provider and releases resources\n\tClose() error\n}\n```\nProvider defines the interface for error tracking providers\n\n```go\nfunc NewProviderFromConfig(cfg config.ErrorTrackingConfig) (Provider, error)\n```\nNewProviderFromConfig creates an error tracking provider based on the configuration\n\n```go\ntype SentryConfig struct {\n\tDSN              string\n\tEnvironment      string\n\tRelease          string\n\tDebug            bool\n\tSampleRate       float64\n\tTracesSampleRate float64\n}\n```\nSentryConfig holds the configuration for Sentry\n\n```go\ntype SentryProvider struct {\n\t// contains filtered or unexported fields\n}\n```\nSentryProvider implements the Provider interface using Sentry\n\n```go\nfunc NewSentryProvider(config SentryConfig) (*SentryProvider, error)\n```\nNewSentryProvider creates a new Sentry provider\n\n```go\nfunc (s *SentryProvider) CaptureError(ctx context.Context, err error, severity Severity, extra map[string]interface{})\n```\nCaptureError captures an error with the given severity and additional context\n\n```go\nfunc (s *SentryProvider) CaptureMessage(ctx context.Context, message string, severity Severity, extra map[string]interface{})\n```\nCaptureMessage captures a message with the given severity and additional context\n\n```go\nfunc (s *SentryProvider) CapturePanic(ctx context.Context, recovered interface{}, stackTrace []byte, extra map[string]interface{})\n```\nCapturePanic captures a panic with stack trace\n\n```go\nfunc (s *SentryProvider) Close() error\n```\nClose closes the provider and releases resources\n\n```go\nfunc (s *SentryProvider) Flush(timeout int) bool\n```\nFlush waits for all events to be sent (useful for graceful shutdown)\n\n```go\ntype Severity string\n```\nSeverity represents the severity level of an error\n\n```go\nconst (\n\tSeverityError   Severity = \"error\"\n\tSeverityWarning Severity = \"warning\"\n\tSeverityInfo    Severity = \"info\"\n\tSeverityDebug   Severity = \"debug\"\n)\n```\n\n","path":"github.com/bitechdev/ResolveSpec/pkg/errortracking","name":"errortracking","synopsis":"","isRedistributable":true}
