span

package
v0.1.92 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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