observability

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package observability defines the tracing abstraction (Tracer, spans, and attributes) used to instrument workflow execution; the opentelemetry subpackage provides an OpenTelemetry implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Key   string
	Value any
}

Attribute is a key-value pair recorded on workflow telemetry spans or events.

func BoolAttribute

func BoolAttribute(key string, value bool) Attribute

BoolAttribute creates a bool telemetry attribute.

func StringAttribute

func StringAttribute(key, value string) Attribute

StringAttribute creates a string telemetry attribute.

type Span

type Span interface {
	End()
	AddEvent(name string, attrs ...Attribute)
	SetAttributes(attrs ...Attribute)
	RecordError(err error)
	SetError(message string)
}

Span records workflow telemetry span data.

type SpanKind

type SpanKind int

SpanKind describes the role of a workflow telemetry span.

const (
	// SpanKindInternal identifies internal workflow processing spans.
	SpanKindInternal SpanKind = iota

	// SpanKindProducer identifies spans that produce messages for later processing.
	SpanKindProducer
)

type SpanOptions

type SpanOptions struct {
	Kind               SpanKind
	SourceTraceContext map[string]string
}

SpanOptions configures a telemetry span start operation.

type Tracer

type Tracer interface {
	Start(ctx context.Context, name string, options SpanOptions) (context.Context, Span)
	ExtractTraceContext(ctx context.Context) map[string]string
}

Tracer starts workflow telemetry spans and extracts trace context.

Directories

Path Synopsis
Package opentelemetry implements the workflow observability Tracer using OpenTelemetry, emitting spans for workflow and executor activity.
Package opentelemetry implements the workflow observability Tracer using OpenTelemetry, emitting spans for workflow and executor activity.

Jump to

Keyboard shortcuts

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