Documentation ¶
Index ¶
- Constants
- func ExtractGraphQLMethodName(req *http.Request) string
- func ExtractTextMapCarrier(spanCtx opentracing.SpanContext) opentracing.TextMapCarrier
- func GraphQlTracingEnhancer(ctx context.Context) func(c *gin.Context)
- func InjectSpanContextIntoGraphQLRequest(req *graphql.Request, span opentracing.Span)
- func InjectSpanContextIntoGrpcMetadata(ctx context.Context, span opentracing.Span) context.Context
- func InjectSpanContextIntoHTTPRequest(req *http.Request, span opentracing.Span) *http.Request
- func InjectTextMapCarrier(spanCtx opentracing.SpanContext) (opentracing.TextMapCarrier, error)
- func LogObjectAsJson(span opentracing.Span, name string, object any)
- func NewJaegerTracer(jaegerConfig *JaegerConfig, log logger.Logger) (opentracing.Tracer, io.Closer, error)
- func SetDefaultListenerSpanTags(ctx context.Context, span opentracing.Span)
- func SetDefaultNeo4jRepositorySpanTags(ctx context.Context, span opentracing.Span)
- func SetDefaultPostgresRepositorySpanTags(ctx context.Context, span opentracing.Span)
- func SetDefaultServiceSpanTags(ctx context.Context, span opentracing.Span)
- func StartHttpServerTracerSpanWithHeader(ctx context.Context, operationName string, headers http.Header) (context.Context, opentracing.Span)
- func StartRabbitMQMessageTracerSpanWithHeader(ctx context.Context, operationName string, uberTraceId string) (context.Context, opentracing.Span)
- func StartTracerSpan(ctx context.Context, operationName string) (opentracing.Span, context.Context)
- func TagComponentCronJob(span opentracing.Span)
- func TagComponentNeo4jRepository(span opentracing.Span)
- func TagComponentPostgresRepository(span opentracing.Span)
- func TagComponentRest(span opentracing.Span)
- func TagComponentService(span opentracing.Span)
- func TagEntity(span opentracing.Span, entityId string)
- func TagTenant(span opentracing.Span, tenant string)
- func TraceErr(span opentracing.Span, err error, fields ...log.Field)
- func TracingEnhancer(ctx context.Context, endpoint string) func(c *gin.Context)
- type JaegerConfig
Constants ¶
View Source
const ( SpanTagTenant = "tenant" SpanTagUserId = "user-id" SpanTagUserEmail = "user-email" SpanTagEntityId = "entity-id" SpanTagComponent = "component" SpanTagExternalSystem = "external-system" SpanTagAggregateId = "aggregateID" )
View Source
const ( SpanTagComponentPostgresRepository = "postgresRepository" SpanTagComponentNeo4jRepository = "neo4jRepository" SpanTagComponentRest = "rest" SpanTagComponentCronJob = "cronJob" SpanTagComponentService = "service" )
Variables ¶
This section is empty.
Functions ¶
func ExtractTextMapCarrier ¶
func ExtractTextMapCarrier(spanCtx opentracing.SpanContext) opentracing.TextMapCarrier
func InjectTextMapCarrier ¶
func InjectTextMapCarrier(spanCtx opentracing.SpanContext) (opentracing.TextMapCarrier, error)
func LogObjectAsJson ¶
func NewJaegerTracer ¶
func StartTracerSpan ¶
func TagComponentCronJob ¶
func TagComponentCronJob(span opentracing.Span)
func TagComponentNeo4jRepository ¶
func TagComponentNeo4jRepository(span opentracing.Span)
func TagComponentPostgresRepository ¶
func TagComponentPostgresRepository(span opentracing.Span)
func TagComponentRest ¶
func TagComponentRest(span opentracing.Span)
func TagComponentService ¶
func TagComponentService(span opentracing.Span)
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"` }
Click to show internal directories.
Click to hide internal directories.