Documentation ¶
Index ¶
- Variables
- func ContextWithMonitor(ctx context.Context, m Monitor) context.Context
- func ContextWithTransaction(ctx context.Context, tx Transaction) context.Context
- func Start(ctx context.Context) (context.Context, error)
- type Monitor
- type Transaction
- func ContextTransaction(ctx context.Context) (Transaction, bool)
- func NewDatadogTransaction(ctx context.Context, spanName string) (Transaction, context.Context)
- func NewStdOutTransaction(ctx context.Context, name string) (Transaction, context.Context)
- func StartTransaction(ctx context.Context, name string) (Transaction, context.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MonitorType string DatadogDebugMode bool Addr string ServiceName string )
Functions ¶
func ContextWithTransaction ¶
func ContextWithTransaction(ctx context.Context, tx Transaction) context.Context
Types ¶
type Monitor ¶
type Monitor interface { Start(context.Context) error StartTransaction(ctx context.Context, name string) (Transaction, context.Context) CreateWrapHandleFunc(path string) func(h http.HandlerFunc) http.HandlerFunc }
func ContextMonitor ¶
func NewDatadogMonitor ¶
func NewDatadogMonitor() Monitor
func NewNullMonitor ¶
func NewNullMonitor() Monitor
func NewStdOutMonitor ¶
func NewStdOutMonitor() Monitor
type Transaction ¶
type Transaction interface { End() AddAttribute(key string, value any) AddAttributes(attrs map[string]any) StartTransaction(ctx context.Context, name string) (Transaction, context.Context) NoticeError(err error) }
func ContextTransaction ¶
func ContextTransaction(ctx context.Context) (Transaction, bool)
func NewDatadogTransaction ¶
func NewStdOutTransaction ¶
func StartTransaction ¶
Click to show internal directories.
Click to hide internal directories.