Documentation ¶
Index ¶
- func GetContextWithTraceId(ctx context.Context, traceId string) context.Context
- type ErrorReporter
- type ErrorReporterOptions
- type Instrumentor
- type NoopSpan
- func (n *NoopSpan) Context() context.Context
- func (n *NoopSpan) Finish()
- func (n *NoopSpan) GetDurationMs() int64
- func (n *NoopSpan) GetOperation() string
- func (n *NoopSpan) GetTraceId() string
- func (n *NoopSpan) GetTxName() string
- func (n *NoopSpan) SetTransactionName(txName string)
- func (n *NoopSpan) StartSpan(ctx context.Context)
- type Span
- type SpanRecorder
- type TraceIdContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorReporter ¶ added in v0.3.0
type ErrorReporter interface { FlushErrorReporting() CaptureError(err error, options ErrorReporterOptions) bool }
func NewErrorReporter ¶ added in v1.4.2
func NewErrorReporter(logger *zerolog.Logger) ErrorReporter
type ErrorReporterOptions ¶ added in v0.3.1
type ErrorReporterOptions struct {
ErrorDiagnosticPath string
}
type Instrumentor ¶
type Instrumentor interface { StartSpan(ctx context.Context, operation string) Span NewTransaction( ctx context.Context, txName string, operation string, ) Span Finish(span Span) }
Instrumentor exposes functions used for adding instrumentation context to functions.
func NewInstrumentor ¶ added in v1.4.2
func NewInstrumentor() Instrumentor
type NoopSpan ¶ added in v1.4.2
type NoopSpan struct { Operation string TxName string Started bool Finished bool StartTime int64 FinishTime int64 // contains filtered or unexported fields }
func NewNoopSpan ¶ added in v1.4.2
func (*NoopSpan) GetDurationMs ¶ added in v1.4.2
func (*NoopSpan) GetOperation ¶ added in v1.4.2
func (*NoopSpan) GetTraceId ¶ added in v1.4.2
func (*NoopSpan) SetTransactionName ¶ added in v1.4.2
type Span ¶
type Span interface { SetTransactionName(name string) StartSpan(ctx context.Context) Finish() GetOperation() string GetTxName() string // GetTraceId Returns UUID of the trace GetTraceId() string Context() context.Context GetDurationMs() int64 }
Span exposes functions that have context about functions.
type SpanRecorder ¶ added in v1.4.2
type TraceIdContextKey ¶ added in v1.4.2
type TraceIdContextKey string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.