Documentation ¶
Index ¶
- func ContextWithTransaction(ctx context.Context, txn Transaction) context.Context
- func InitSelfInstrumentation(c *config.Config, resolver hostname.Resolver)
- func NewGauge(name string, val float64) metric
- func NewGaugeWithAttributes(name string, val float64, attrs map[string]interface{}) metric
- type AgentInstrumentation
- type MetricType
- type NoopSegment
- type NoopTransaction
- func (n NoopTransaction) AddAttribute(key string, value interface{})
- func (n NoopTransaction) End()
- func (n NoopTransaction) NoticeError(_ error)
- func (n NoopTransaction) StartExternalSegment(ctx context.Context, name string, req *http.Request) (context.Context, Segment)
- func (n NoopTransaction) StartSegment(ctx context.Context, _ string) (context.Context, Segment)
- type Segment
- type SegmentApm
- type Transaction
- type TransactionApm
- func (t *TransactionApm) AddAttribute(key string, value interface{})
- func (t *TransactionApm) End()
- func (t *TransactionApm) NoticeError(err error)
- func (t *TransactionApm) StartExternalSegment(ctx context.Context, name string, req *http.Request) (context.Context, Segment)
- func (t *TransactionApm) StartSegment(ctx context.Context, name string) (context.Context, Segment)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithTransaction ¶
func ContextWithTransaction(ctx context.Context, txn Transaction) context.Context
func InitSelfInstrumentation ¶
func NewGaugeWithAttributes ¶
Types ¶
type AgentInstrumentation ¶
type AgentInstrumentation interface { StartTransaction(ctx context.Context, name string) (context.Context, Transaction) RecordMetric(ctx context.Context, metric metric) }
AgentInstrumentation does it make sense to abstract it?
var SelfInstrumentation AgentInstrumentation = noopInstrumentation{}
type NoopSegment ¶
type NoopSegment struct { }
func (NoopSegment) AddAttribute ¶
func (n NoopSegment) AddAttribute(key string, value interface{})
func (NoopSegment) End ¶
func (n NoopSegment) End()
type NoopTransaction ¶
type NoopTransaction struct {
// contains filtered or unexported fields
}
func (NoopTransaction) AddAttribute ¶
func (n NoopTransaction) AddAttribute(key string, value interface{})
func (NoopTransaction) End ¶
func (n NoopTransaction) End()
func (NoopTransaction) NoticeError ¶
func (n NoopTransaction) NoticeError(_ error)
func (NoopTransaction) StartExternalSegment ¶
func (NoopTransaction) StartSegment ¶
type SegmentApm ¶
type SegmentApm struct {
// contains filtered or unexported fields
}
func (*SegmentApm) AddAttribute ¶
func (t *SegmentApm) AddAttribute(key string, value interface{})
func (*SegmentApm) End ¶
func (t *SegmentApm) End()
type Transaction ¶
type Transaction interface { StartSegment(ctx context.Context, name string) (context.Context, Segment) StartExternalSegment(ctx context.Context, name string, req *http.Request) (context.Context, Segment) AddAttribute(key string, value interface{}) End() NoticeError(err error) }
func TransactionFromContext ¶
func TransactionFromContext(ctx context.Context) Transaction
type TransactionApm ¶
type TransactionApm struct {
// contains filtered or unexported fields
}
func (*TransactionApm) AddAttribute ¶
func (t *TransactionApm) AddAttribute(key string, value interface{})
func (*TransactionApm) End ¶
func (t *TransactionApm) End()
func (*TransactionApm) NoticeError ¶
func (t *TransactionApm) NoticeError(err error)
func (*TransactionApm) StartExternalSegment ¶
func (*TransactionApm) StartSegment ¶
Click to show internal directories.
Click to hide internal directories.