codec

package
v1.34.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 3 Imported by: 36

Documentation

Index

Constants

View Source
const DefaultServiceName = "unknown"

DefaultServiceName when the span does not have any serviceName

Variables

This section is empty.

Functions

func MicroToTime

func MicroToTime(micro int64) time.Time

MicroToTime converts zipkin's native time of microseconds into time.Time

func NewAnnotations

func NewAnnotations(annotations []Annotation, endpoint Endpoint) []trace.Annotation

NewAnnotations converts a slice of Annotation into a slice of new Annotations

func NewBinaryAnnotations

func NewBinaryAnnotations(annotations []BinaryAnnotation, endpoint Endpoint) []trace.BinaryAnnotation

NewBinaryAnnotations is very similar to NewAnnotations, but it converts BinaryAnnotations instead of the normal Annotation

func NewTrace

func NewTrace(spans []Span) (trace.Trace, error)

NewTrace converts a slice of []Span into a new Trace

Types

type Annotation

type Annotation interface {
	Timestamp() time.Time
	Value() string
	Host() Endpoint
}

Annotation represents an event that explains latency with a timestamp.

type BinaryAnnotation

type BinaryAnnotation interface {
	Key() string
	Value() string
	Host()