Documentation
¶
Index ¶
- func NewEventID() string
- type BatchItemResult
- type Config
- type Duck
- func (d *Duck) AddBreadcrumb(breadcrumb map[string]any)
- func (d *Duck) CaptureTransaction(transaction *Transaction)
- func (d *Duck) CaptureTransactionContext(ctx context.Context, transaction *Transaction)
- func (d *Duck) ClearBreadcrumbs()
- func (d *Duck) ClearTags()
- func (d *Duck) ClearUser()
- func (d *Duck) Flush(ctx context.Context)
- func (d *Duck) Log(level any, message string, details any)
- func (d *Duck) LogContext(ctx context.Context, level any, message string, details any)
- func (d *Duck) LogContextAt(ctx context.Context, at time.Time, level any, message string, details any)
- func (d *Duck) Ping() error
- func (d *Duck) Pond() *pond.Pond
- func (d *Duck) Quack(err error)
- func (d *Duck) QuackContext(ctx context.Context, err error)
- func (d *Duck) QuackContextDetails(ctx context.Context, err error, details any, handled bool, mechanism string)
- func (d *Duck) QuackDetails(err error, details any, handled bool, mechanism string)
- func (d *Duck) QuackRecoveredPanicContext(ctx context.Context, recovered any, mechanism string)
- func (d *Duck) RegisterProvider(provider Provider)
- func (d *Duck) SetDist(value string)
- func (d *Duck) SetEnvironment(value string)
- func (d *Duck) SetExtra(value map[string]any)
- func (d *Duck) SetFingerprint(value string)
- func (d *Duck) SetPlatform(value string)
- func (d *Duck) SetRelease(value string)
- func (d *Duck) SetRequestID(value string)
- func (d *Duck) SetRuntime(value map[string]any)
- func (d *Duck) SetSDK(value map[string]any)
- func (d *Duck) SetServerName(value string)
- func (d *Duck) SetService(value string)
- func (d *Duck) SetTag(key string, value any)
- func (d *Duck) SetTags(tags map[string]any)
- func (d *Duck) SetTrace(traceID, spanID string)
- func (d *Duck) SetTransaction(value string)
- func (d *Duck) SetUser(user map[string]any)
- func (d *Duck) StartTransaction(name string, op string) *Transaction
- type Event
- type EventType
- type FailureInfo
- type FlushableProvider
- type Level
- type Provider
- type Span
- type Transaction
- func (t *Transaction) AddMeasurement(key string, value any, unit string) *Transaction
- func (t *Transaction) Context() any
- func (t *Transaction) DurationMs() int64
- func (t *Transaction) EndTimestampMs() *int64
- func (t *Transaction) Finish(status string, endTimestampMs ...int64) *Transaction
- func (t *Transaction) Measurements() map[string]any
- func (t *Transaction) Name() string
- func (t *Transaction) Op() string
- func (t *Transaction) ParentSpanID() string
- func (t *Transaction) SetContext(value any) *Transaction
- func (t *Transaction) SetParentSpanID(value string) *Transaction
- func (t *Transaction) SpanID() string
- func (t *Transaction) Spans() []*Span
- func (t *Transaction) StartChild(op string, description string) *Span
- func (t *Transaction) StartTimestampMs() int64
- func (t *Transaction) Status() string
- func (t *Transaction) TraceID() string
- type TransportResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventID ¶ added in v0.4.0
func NewEventID() string
NewEventID mints an event id in the only shape ingest accepts: the server validates the field as uuid4, so a random UUID with the version and variant bits set is what makes an event deduplicable rather than rejected with 400. It is exported because the id is not optional for anyone assembling an ingest payload by hand - see ensureEventID in providers/duckbug.
Types ¶
type BatchItemResult ¶
type Duck ¶
type Duck struct {
// contains filtered or unexported fields
}
func (*Duck) AddBreadcrumb ¶
func (*Duck) CaptureTransaction ¶
func (d *Duck) CaptureTransaction(transaction *Transaction)
func (*Duck) CaptureTransactionContext ¶
func (d *Duck) CaptureTransactionContext(ctx context.Context, transaction *Transaction)
func (*Duck) ClearBreadcrumbs ¶
func (d *Duck) ClearBreadcrumbs()
func (*Duck) LogContext ¶ added in v0.2.0
func (*Duck) LogContextAt ¶ added in v0.2.0
func (*Duck) QuackContextDetails ¶ added in v0.2.0
func (*Duck) QuackDetails ¶ added in v0.2.0
func (*Duck) QuackRecoveredPanicContext ¶ added in v0.2.0
func (*Duck) RegisterProvider ¶
func (*Duck) SetEnvironment ¶
func (*Duck) SetFingerprint ¶
func (*Duck) SetPlatform ¶
func (*Duck) SetRelease ¶
func (*Duck) SetRequestID ¶
func (*Duck) SetRuntime ¶
func (*Duck) SetServerName ¶
func (*Duck) SetService ¶
func (*Duck) SetTransaction ¶
func (*Duck) StartTransaction ¶
func (d *Duck) StartTransaction(name string, op string) *Transaction
type FailureInfo ¶
type FailureInfo struct {
Type EventType
Items []map[string]any
Result TransportResult
Message string
}
type FlushableProvider ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
func (*Span) ParentSpanID ¶
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) AddMeasurement ¶
func (t *Transaction) AddMeasurement(key string, value any, unit string) *Transaction
func (*Transaction) Context ¶
func (t *Transaction) Context() any
func (*Transaction) DurationMs ¶
func (t *Transaction) DurationMs() int64
func (*Transaction) EndTimestampMs ¶
func (t *Transaction) EndTimestampMs() *int64
func (*Transaction) Finish ¶
func (t *Transaction) Finish(status string, endTimestampMs ...int64) *Transaction
func (*Transaction) Measurements ¶
func (t *Transaction) Measurements() map[string]any
func (*Transaction) Name ¶
func (t *Transaction) Name() string
func (*Transaction) Op ¶
func (t *Transaction) Op() string
func (*Transaction) ParentSpanID ¶
func (t *Transaction) ParentSpanID() string
func (*Transaction) SetContext ¶
func (t *Transaction) SetContext(value any) *Transaction
func (*Transaction) SetParentSpanID ¶
func (t *Transaction) SetParentSpanID(value string) *Transaction
func (*Transaction) SpanID ¶
func (t *Transaction) SpanID() string
func (*Transaction) Spans ¶
func (t *Transaction) Spans() []*Span
func (*Transaction) StartChild ¶
func (t *Transaction) StartChild(op string, description string) *Span
func (*Transaction) StartTimestampMs ¶
func (t *Transaction) StartTimestampMs() int64
func (*Transaction) Status ¶
func (t *Transaction) Status() string
func (*Transaction) TraceID ¶
func (t *Transaction) TraceID() string
type TransportResult ¶
type TransportResult struct {
StatusCode int
ResponseBody string
ErrorMessage string
Attempts int
Duplicate bool
Items []BatchItemResult
}
func (TransportResult) IsSuccess ¶
func (r TransportResult) IsSuccess() bool