Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Span ¶
type Span interface {
End()
SetTag(key, value string)
Context() context.Context
SetContext(ctx context.Context)
StartChildSpan(operation string, description string) Span
}
Span is a child operation under a transaction (or under another span).
type TraceSight ¶
type TraceSight interface {
// StartTransaction begins a root transaction in the tracing system
// and returns an updated context plus the Transaction object.
StartTransaction(ctx context.Context, operation, description string) Transaction
// CurrentTransaction attempts to retrieve the current Transaction from ctx if any,
// or return nil if not found.
CurrentTransaction(ctx context.Context) Transaction
}
TraceSight is the interface each driver must implement.
type Transaction ¶
type Transaction interface {
// End finishes the transaction.
End()
// SetName changes the transaction name if needed.
SetName(name string)
// SetTag or SetAttribute
SetTag(key, value string)
// SetUser Optionally attach user
SetUser(user UserInfo)
// SetRequest Optionally attach request
SetRequest(req *http.Request)
SetResponseCode(responseCode int)
GetRootSpan() Span
SetContext(ctx context.Context)
Context() context.Context
}
Transaction is a high-level operation or root span in your tracing system.
Click to show internal directories.
Click to hide internal directories.