Documentation
¶
Index ¶
Constants ¶
const ( // ParentSpanGormKey is the name of the parent span key ParentSpanGormKey = "tracingParentSpan" // SpanGormKey is the name of the span key SpanGormKey = "tracingSpan" )
Variables ¶
This section is empty.
Functions ¶
func InstrumentAWSSession ¶
func InstrumentAWSSession(session *awssession.Session, settings Settings) *awssession.Session
InstrumentAWSSession configures DD tracing mode.
func InstrumentDatabase ¶
InstrumentDatabase adds callbacks for tracing, call TraceDatabase to make it work
Types ¶
type Config ¶
type Config struct {
Enabled bool `mapstructure:"enabled"`
// contains filtered or unexported fields
}
type LogContext ¶
type LogContext struct {
// TraceID returns the trace ID that this context is carrying.
TraceID uint64
// SpanID returns the span ID that this context is carrying.
SpanID uint64
}
LogContext represents a log state that can be used to collerate logs emitted across the request cycle.
func TraceLogs ¶
func TraceLogs(ctx context.Context) *LogContext
TraceLogs extracts and returns a LogContext for Logs.
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler wraps DataDog profiles exporter.
func NewProfiler ¶
NewProfiler constructs new profiler with options. You can include common options like: profiler.WithService(appName), profiler.WithVersion(version).
type Tracer ¶
type Tracer struct {
Enabled bool
Environment string
Options []tracer.StartOption
}
Tracer is a "controller" to a ddtrace.tracer.
Tracer is not exactly a "wrapper" because the tracer is a private/global entity in the tracer library and it's not directly accessible. - https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer#Start - https://github.com/DataDog/dd-trace-go/blob/v1.19.0/ddtrace/tracer/tracer.go
Tracer specifies an implementation of the Datadog tracer which allows starting and propagating spans.
func NewTracer ¶
func NewTracer(config *Config, options ...tracer.StartOption) *Tracer
New tracer returns a new tracer with the giver configuration and an optional list of ddtrace's tracer.StartOptions.