tracing

package
v0.0.0-...-bf444b6 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeUserEmail          = "user.email"
	AttributeQueryLabels        = "query.labels"
	AttributeQueryID            = "query.id"
	AttributeQueryLimit         = "query.limit"
	AttributeQueryOffset        = "query.offset"
	AttributeQueryDepth         = "query.depth"
	AttributeQueryPatchLen      = "query.patch_length"
	AttributeQueryResultLen     = "query.result_length"
	AttributeSystemHealthStatus = "system.health.status"
)

Variables

View Source
var (
	ErrNoTracer = errors.New("no tracer") // the tracer is missing

)

Functions

func NewTracerProvider

func NewTracerProvider(ctx context.Context, version *model.VersionInfo, service string, cfg *config.TracingConfig) (trace.TracerProvider, error)

NewTracerProvider creates a new tracer provider.

func WithQueryDepthAttribute

func WithQueryDepthAttribute(depth int) attribute.KeyValue

WithQueryDepthAttribute adds the query depth to the span.

func WithQueryIDAttribute

func WithQueryIDAttribute(id string) attribute.KeyValue

WithQueryIDAttribute adds the inner of the updated entity to the span.

func WithQueryLabelsAttribute

func WithQueryLabelsAttribute(labels ...string) attribute.KeyValue

WithQueryLabelsAttribute adds the node labels to the span.

func WithQueryLimitAttribute

func WithQueryLimitAttribute(limit int) attribute.KeyValue

WithQueryLimitAttribute adds the query limit to the span.

func WithQueryOffsetAttribute

func WithQueryOffsetAttribute(offset int) attribute.KeyValue

WithQueryOffsetAttribute adds the query offset to the span.

func WithQueryPatchLenAttribute

func WithQueryPatchLenAttribute(length int) attribute.KeyValue

WithQueryPatchLenAttribute adds the query patch to the span.

func WithQueryResultLenAttribute

func WithQueryResultLenAttribute(length int) attribute.KeyValue

WithQueryResultLenAttribute adds the query result length to the span.

func WithSystemHealthStatusAttribute

func WithSystemHealthStatusAttribute(status model.HealthStatus) attribute.KeyValue

WithSystemHealthStatusAttribute adds the system health status to the span.

func WithUserEmailAttribute

func WithUserEmailAttribute(email string) attribute.KeyValue

WithUserEmailAttribute adds the user email to the span.

Types

type Tracer

type Tracer interface {
	embedded.Tracer
	Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
}

Tracer re-defines the tracing.Tracer interface as the

func NoopTracer

func NoopTracer() Tracer

NoopTracer returns a noop tracer.

Jump to

Keyboard shortcuts

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