Documentation ¶
Overview ¶
Package transform provides transformation functionality from the sdk/log data-types into OTLP data-types.
Index ¶
- func Attr(kv attribute.KeyValue) *cpb.KeyValue
- func AttrIter(iter attribute.Iterator) []*cpb.KeyValue
- func AttrValue(v attribute.Value) *cpb.AnyValue
- func Attrs(attrs []attribute.KeyValue) []*cpb.KeyValue
- func LogAttr(attr api.KeyValue) *cpb.KeyValue
- func LogAttrValue(v api.Value) *cpb.AnyValue
- func LogAttrValues(vals []api.Value) []*cpb.AnyValue
- func LogAttrs(attrs []api.KeyValue) []*cpb.KeyValue
- func LogRecord(record log.Record) *lpb.LogRecord
- func ResourceLogs(records []log.Record) []*lpb.ResourceLogs
- func SeverityNumber(s api.Severity) lpb.SeverityNumber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attr ¶
Attr transforms an attribute.KeyValue into an OTLP key-value.
func AttrIter ¶
AttrIter transforms an attribute.Iterator into OTLP key-values.
func AttrValue ¶
AttrValue transforms an attribute.Value into an OTLP AnyValue.
func Attrs ¶
Attrs transforms a slice of attribute.KeyValue into OTLP key-values.
func LogAttr ¶
LogAttr transforms an api.KeyValue into an OTLP key-value.
func LogAttrValue ¶
LogAttrValue transforms an api.Value into an OTLP AnyValue.
func LogAttrValues ¶
LogAttrValues transforms a slice of api.Value into an OTLP []AnyValue.
func LogAttrs ¶
Attrs transforms a slice of api.KeyValue into OTLP key-values.
func ResourceLogs ¶
func ResourceLogs(records []log.Record) []*lpb.ResourceLogs
ResourceLogs returns an slice of OTLP ResourceLogs generated from records.
func SeverityNumber ¶
func SeverityNumber(s api.Severity) lpb.SeverityNumber
SeverityNumber transforms a log.Severity into an OTLP SeverityNumber.
Types ¶
This section is empty.