logs

package module
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Overview

Package logs provides utils for transforming OTLP LogRecord to Datadog format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transform

func Transform(lr plog.LogRecord, res pcommon.Resource, logger *zap.Logger) datadogV2.HTTPLogItem

Transform converts the log record in lr, which came in with the resource in res to a Datadog log item. the variable specifies if the log body should be sent as an attribute or as a plain message. Deprecated: use Translator instead.

Types

type Translator added in v0.11.0

type Translator struct {
	// contains filtered or unexported fields
}

Translator of OTLP logs to Datadog format

func NewTranslator added in v0.11.0

func NewTranslator(set component.TelemetrySettings, attributesTranslator *attributes.Translator, otelSource string) (*Translator, error)

NewTranslator returns a new Translator

func (*Translator) MapLogs added in v0.11.0

func (t *Translator) MapLogs(ctx context.Context, ld plog.Logs) []datadogV2.HTTPLogItem

MapLogs from OTLP format to Datadog format.

Jump to

Keyboard shortcuts

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