transform

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package transform provides transformation functionality from the sdk/log data-types into OTLP data-types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attr

func Attr(kv attribute.KeyValue) *cpb.KeyValue

Attr transforms an attribute.KeyValue into an OTLP key-value.

func AttrIter

func AttrIter(iter attribute.Iterator) []*cpb.KeyValue

AttrIter transforms an attribute.Iterator into OTLP key-values.

func AttrValue

func AttrValue(v attribute.Value) *cpb.AnyValue

AttrValue transforms an attribute.Value into an OTLP AnyValue.

func Attrs

func Attrs(attrs []attribute.KeyValue) []*cpb.KeyValue

Attrs transforms a slice of attribute.KeyValue into OTLP key-values.

func LogAttr

func LogAttr(attr api.KeyValue) *cpb.KeyValue

LogAttr transforms an api.KeyValue into an OTLP key-value.

func LogAttrValue

func LogAttrValue(v api.Value) *cpb.AnyValue

LogAttrValue transforms an api.Value into an OTLP AnyValue.

func LogAttrValues

func LogAttrValues(vals []api.Value) []*cpb.AnyValue

LogAttrValues transforms a slice of api.Value into an OTLP []AnyValue.

func LogAttrs

func LogAttrs(attrs []api.KeyValue) []*cpb.KeyValue

Attrs transforms a slice of api.KeyValue into OTLP key-values.

func LogRecord

func LogRecord(record log.Record) *lpb.LogRecord

LogRecord returns an OTLP LogRecord generated from record.

func ResourceLogs

func ResourceLogs(records []log.Record) []*lpb.ResourceLogs

ResourceLogs returns an slice of OTLP ResourceLogs generated from records.

func ScopeLogs

func ScopeLogs(records []log.Record) []*lpb.ScopeLogs

ScopeLogs returns a slice of OTLP ScopeLogs generated from recoreds.

func SeverityNumber

func SeverityNumber(s api.Severity) lpb.SeverityNumber

SeverityNumber transforms a log.Severity into an OTLP SeverityNumber.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL