tracelog

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpanId            = "dd.span_id"
	TraceId           = "dd.trace_id"
	DatadogServiceKey = "dd.service"
	DatadogEnvKey     = "dd.env"
	DatadogVersionKey = "dd.version"
)

Variables

This section is empty.

Functions

func New

func New() func(ctx context.Context, req *http.Request) tracing.Tracing

func Setup

func Setup(options ...Option)

func WithTrace

func WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Types

type Option

type Option func()

func Env

func Env(env string) Option

func Service

func Service(service string) Option

func Version

func Version(version string) Option

type TracingContext

type TracingContext struct {
	Path      string
	ClientIP  string
	RequestID string
	Service   string
}

func (*TracingContext) Dump

func (tc *TracingContext) Dump(ctx context.Context, log *zerolog.Event) *zerolog.Event

func (*TracingContext) WithTrace

func (tc *TracingContext) WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL