Documentation ¶
Index ¶
Constants ¶
const ValidJSON = `` /* 675-byte string literal not displayed */
ValidJSON is useful for testing
Variables ¶
var DefaultLogger = log.DefaultLogger.CreateChild()
DefaultLogger is used by package structs that don't have a default logger set.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
Annotation associates an event that explains latency with a timestamp. Unlike log statements, annotations are often codes. Ex. “ws” for WireSend
type Endpoint ¶
type Endpoint struct { ServiceName *string `json:"serviceName"` Ipv4 *string `json:"ipv4"` Ipv6 *string `json:"ipv6"` Port *int32 `json:"port"` }
Endpoint is the network context of a node in the service graph
type MiddlewareConstructor ¶
A MiddlewareConstructor is used by FromChain to chain together a bunch of sinks that forward to each other
func NextWrap ¶
func NextWrap(wrapping NextSink) MiddlewareConstructor
NextWrap wraps a NextSink to make it usable by MiddlewareConstructor
type Sink ¶
A Sink is an object that can accept traces and do something with them, like forward them to some endpoint
func FromChain ¶
func FromChain(endSink Sink, sinks ...MiddlewareConstructor) Sink
FromChain creates an endpoint Sink that sends calls between multiple middlewares for things like counting traces in between.
type Span ¶
type Span struct { TraceID string `json:"traceId"` // required Name *string `json:"name"` ParentID *string `json:"parentId"` ID string `json:"id"` // required Kind *string `json:"kind"` Timestamp *float64 `json:"timestamp"` Duration *float64 `json:"duration"` Debug *bool `json:"debug"` LocalEndpoint *Endpoint `json:"localEndpoint"` RemoteEndpoint *Endpoint `json:"remoteEndpoint"` Annotations []*Annotation `json:"annotations"` Tags map[string]string `json:"tags"` }
Span defines a span