tracing

package
v0.0.0-...-4518f94 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 29

Documentation

Index

Constants

View Source
const (
	SpanTagTenant         = "tenant"
	SpanTagUserId         = "user-id"
	SpanTagUserEmail      = "user-email"
	SpanTagEntityId       = "entity-id"
	SpanTagComponent      = "component"
	SpanTagExternalSystem = "external-system"
)

Variables

This section is empty.

Functions

func InjectSpanContextIntoGrpcMetadata

func InjectSpanContextIntoGrpcMetadata(ctx context.Context, span opentracing.Span) context.Context

func LogObjectAsJson

func LogObjectAsJson(span opentracing.Span, name string, object any)

func NewJaegerTracer

func NewJaegerTracer(jaegerConfig *JaegerConfig, log logger.Logger) (opentracing.Tracer, io.Closer, error)

func SetDefaultNeo4jRepositorySpanTags

func SetDefaultNeo4jRepositorySpanTags(ctx context.Context, span opentracing.Span)

func SetDefaultServiceSpanTags

func SetDefaultServiceSpanTags(ctx context.Context, span opentracing.Span)

func TraceErr

func TraceErr(span opentracing.Span, err error, fields ...log.Field)

Types

type JaegerConfig

type JaegerConfig struct {
	ServiceName  string  `env:"JAEGER_SERVICE_NAME" validate:"required"`
	AgentHost    string  `env:"JAEGER_AGENT_HOST" envDefault:"localhost" validate:"required"`
	AgentPort    string  `env:"JAEGER_AGENT_PORT" envDefault:"6831" validate:"required"`
	Enabled      bool    `env:"JAEGER_ENABLED" envDefault:"true"`
	LogSpans     bool    `env:"JAEGER_REPORTER_LOG_SPANS" envDefault:"false" `
	SamplerType  string  `env:"JAEGER_SAMPLER_TYPE" envDefault:"const" validate:"required"`
	SamplerParam float64 `env:"JAEGER_SAMPLER_PARAM" envDefault:"1" validate:"required"`
}

Jump to

Keyboard shortcuts

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