Documentation ¶
Index ¶
Constants ¶
View Source
const OTELJsonFormat = `` /* 1503-byte string literal not displayed */
OTELJsonFormat is useful for testing. All the examples are taken from https://github.com/tigrannajaryan/rfcs/blob/feature/tigran/log-data-model/text/0097-log-data-model.md#example-log-records
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct { TraceID string `json:"traceId,omitempty"` // byte sequences SpanID string `json:"spanId,omitempty"` // byte sequences SeverityText string `json:"severityText,omitempty"` ShortName string `json:"shortName,omitempty"` Body interface{} `json:"body"` TimeStamp uint64 `json:"timestamp"` Resource map[string]interface{} `json:"resource,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` TraceFlag byte `json:"traceFlags,omitempty"` SeverityNumber int8 `json:"severityNumber,omitempty"` }
Log is a record or event that has occurred
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 log record and do something with them, life 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.
Click to show internal directories.
Click to hide internal directories.