tracing

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tracing creates OpenTelemetry spans for job work and inserts.

Index

Constants

View Source
const (
	AttrJobID   = attribute.Key("foreman.job.id")
	AttrKind    = attribute.Key("foreman.job.kind")
	AttrQueue   = attribute.Key("foreman.queue")
	AttrAttempt = attribute.Key("foreman.job.attempt")
	AttrCount   = attribute.Key("foreman.job.count")
)
View Source
const InstrumentationName = "github.com/thnhdatle/foreman"

Variables

This section is empty.

Functions

func End

func End(span trace.Span, err error)

Types

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

Tracer creates Foreman spans.

func New

func New(tp trace.TracerProvider) *Tracer

New returns a tracer from tp.

func (*Tracer) StartInsert

func (t *Tracer) StartInsert(ctx context.Context, kind string, n int) (context.Context, trace.Span)

func (*Tracer) StartWork

func (t *Tracer) StartWork(
	ctx context.Context, id int64, kind, queue string, attempt int,
) (context.Context, trace.Span)

Jump to

Keyboard shortcuts

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