tracing

package
v0.0.0-...-bf6f42e Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpanTagTenant    = "tenant"
	SpanTagComponent = "component"
	SpanTagSource    = "source"
)
View Source
const ComponentNeo4jRepository = "neo4jRepository"
View Source
const ComponentPostgresRepository = "postgresRepository"
View Source
const ComponentSyncService = "syncService"

Variables

This section is empty.

Functions

func NewJaegerTracer

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

func SetDefaultNeo4jRepositorySpanTags

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

func SetDefaultPostgresRepositorySpanTags

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

func SetDefaultSyncServiceSpanTags

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

func StartTracerSpan

func StartTracerSpan(ctx context.Context, operationName string) (opentracing.Span, context.Context)

func TraceErr

func TraceErr(span opentracing.Span, err error)

Types

type Config

type Config struct {
	ServiceName  string  `env:"JAEGER_SERVICE_NAME" envDefault:"sync-customer-os-data" 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:"true" `
	SamplerType  string  `env:"JAEGER_SAMPLER_TYPE" envDefault:"probabilistic" validate:"required"`
	SamplerParam float64 `env:"JAEGER_SAMPLER_PARAM" envDefault:"0.01" validate:"required"`
}

Jump to

Keyboard shortcuts

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