logsagentexporter

package module
v0.57.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Overview

Package logsagentexporter contains a logs exporter which forwards logs to a channel.

Index

Constants

View Source
const (
	// TypeStr defines the logsagent exporter type string.
	TypeStr = "logsagent"

	// LogSourceName specifies the Datadog source tag value to be added to logs sent by the logs agent exporter.
	LogSourceName = "otlp_log_ingestion"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(logsAgentChannel chan *message.Message) exp.Factory

NewFactory creates a new logsagentexporter factory.

Types

type Config

type Config struct {
	OtelSource    string
	LogSourceName string
}

Config defines configuration for the logs agent exporter.

type Exporter added in v0.56.0

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

Exporter defines fields for the logs agent exporter

func NewExporter added in v0.56.0

func NewExporter(
	set component.TelemetrySettings,
	cfg *Config,
	logSource *sources.LogSource,
	logsAgentChannel chan *message.Message,
	attributesTranslator *attributes.Translator,
) (*Exporter, error)

NewExporter initializes a new logs agent exporter with the given parameters

func (*Exporter) ConsumeLogs added in v0.56.0

func (e *Exporter) ConsumeLogs(ctx context.Context, ld plog.Logs) (err error)

ConsumeLogs maps logs from OTLP to DD format and ingests them through the exporter channel

Jump to

Keyboard shortcuts

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