Documentation ¶
Overview ¶
+kubebuilder:validation:Optional
Index ¶
Constants ¶
const (
// SentryFlushWait is the duration to wait for the sentry client to flush its queue.
SentryFlushWait = "5000ms"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrashWriter ¶
type CrashWriter struct {
// contains filtered or unexported fields
}
CrashWriter defines a crash writer with buffer to store the logs when the app crashes.
func NewCrashWriter ¶
func NewCrashWriter(limit int) *CrashWriter
NewCrashWriter returns a new crash writer with new log buffer.
func (*CrashWriter) GetCrashLogs ¶
func (w *CrashWriter) GetCrashLogs() []map[string]interface{}
GetCrashLogs returns the logs buffered in the crash writer until the crash.
type SentryConfig ¶
type SentryConfig struct { // If DSN is not set, the client is effectively disabled // You can set test project's dsn to send log events. // oss-aperture project dsn is set as default. Dsn string `json:"dsn" default:"https://6223f112b0ac4344aa67e94d1631eb85@o574197.ingest.sentry.io/6605877"` // Environment Environment string `json:"environment" default:"production"` // Sample rate for sampling traces i.e. 0.0 to 1.0 TracesSampleRate float64 `json:"traces_sample_rate" default:"0.2"` // Sample rate for event submission i.e. 0.0 to 1.0 SampleRate float64 `json:"sample_rate" default:"1.0"` // Debug enables printing of Sentry SDK debug messages Debug bool `json:"debug" default:"true"` // Configure to generate and attach stacktraces to capturing message calls AttachStacktrace bool `json:"attach_stack_trace" default:"true"` // Sentry crash report disabled Disabled bool `json:"disabled" default:"false"` }
SentryConfig holds configuration for Sentry. swagger:model +kubebuilder:object:generate=true
func (*SentryConfig) DeepCopy ¶ added in v0.1.2
func (in *SentryConfig) DeepCopy() *SentryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SentryConfig.
func (*SentryConfig) DeepCopyInto ¶ added in v0.1.2
func (in *SentryConfig) DeepCopyInto(out *SentryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SentryWriter ¶
type SentryWriter struct {
// contains filtered or unexported fields
}
SentryWriter is a writer that forwards the data to the sentry client and the CrashWriter.
func (*SentryWriter) Close ¶
func (s *SentryWriter) Close() error
Close implements io.Closer and wait for the sentry client to flush its queue.
type SentryWriterConstructor ¶
type SentryWriterConstructor struct { // Name of sentry instance Name string // Config key ConfigKey string // Default Config DefaultConfig SentryConfig }
SentryWriterConstructor holds fields to create an annotated instance of Sentry Writer.
func (SentryWriterConstructor) Annotate ¶
func (constructor SentryWriterConstructor) Annotate() fx.Option
Annotate creates an annotated instance of SentryWriter.