span

package
v0.1.81 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCanonicalField

func IsCanonicalField(name string) bool

IsCanonicalField reports whether a mapping target belongs to the canonical model.

func ValidMappingUnit

func ValidMappingUnit(unit string) bool

Types

type Options

type Options struct {
	Format                                              string
	DateField, TraceIDField, SpanIDField, ParentIDField string
	ServiceField, OperationField, ParentRefType         string
	StatusFields                                        []string
}

type Span

type Span struct {
	TraceID    string          `json:"traceId"`
	SpanID     string          `json:"spanId"`
	ParentID   string          `json:"parentId,omitempty"`
	StartedAt  time.Time       `json:"startedAt"`
	DurationMs float64         `json:"durationMs"`
	Service    string          `json:"service"`
	Operation  string          `json:"operation"`
	Status     string          `json:"status"`
	Kind       string          `json:"kind,omitempty"`
	Attributes map[string]any  `json:"attributes,omitempty"`
	Resource   map[string]any  `json:"resource,omitempty"`
	OTLP       json.RawMessage `json:"otlp,omitempty"`
}

func Normalize

func Normalize(d map[string]any, o Options) (Span, error)

func NormalizeMapped

func NormalizeMapped(document map[string]any, values map[string]any, units map[string]string) (Span, error)

func (Span) Row

func (s Span) Row() map[string]any

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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