processor

package module
v0.79.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 7 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package processor provides log message processing functionality

Index

Constants

View Source
const (
	// UnstructuredProcessingMetricName collects how many rules are used on unstructured
	// content for tailers capable of processing both unstructured and structured content.
	UnstructuredProcessingMetricName = "datadog.logs_agent.tailer.unstructured_processing"
)

Variables

View Source
var JSONPayload = jsonPayload{}

JSONPayload is a shared JSON representation of a message

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	Encode(msg *message.Message, hostname string) error
}

Encoder turns a message into a raw byte array ready to be sent.

var JSONEncoder Encoder = &jsonEncoder{}

JSONEncoder is a shared json encoder.

var JSONServerlessInitEncoder Encoder = &jsonServerlessInitEncoder{}

JSONServerlessInitEncoder is a custom encoder used by serverless-init (Google Cloud Run, Azure Container Apps, etc.) for improved performance.

var ProtoEncoder Encoder = &protoEncoder{}

ProtoEncoder is a shared proto encoder.

var RawEncoder Encoder = &rawEncoder{}

RawEncoder is a shared raw encoder.

type Processor

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

A Processor updates messages from an inputChan and pushes in an outputChan.

func New

func New(config pkgconfigmodel.Reader, inputChan, outputChan chan *message.Message, processingRules []*config.ProcessingRule,
	encoder Encoder, diagnosticMessageReceiver diagnostic.MessageReceiver, hostname hostnameinterface.Component,
	pipelineMonitor metrics.PipelineMonitor, instanceID string) *Processor

New returns an initialized Processor with config support for failover notifications.

func (*Processor) Flush

func (p *Processor) Flush(ctx context.Context)

Flush processes synchronously the messages that this processor has to process. Mainly (only?) used by the Serverless Agent.

func (*Processor) GetHostname

func (p *Processor) GetHostname(msg *message.Message) string

GetHostname returns the hostname to applied the given log message

func (*Processor) Start

func (p *Processor) Start()

Start starts the Processor.

func (*Processor) Stop

func (p *Processor) Stop()

Stop stops the Processor, this call blocks until inputChan is flushed

type ValidUtf8Bytes added in v0.76.0

type ValidUtf8Bytes []byte

func (ValidUtf8Bytes) MarshalText added in v0.76.0

func (msg ValidUtf8Bytes) MarshalText() (text []byte, err error)

func (ValidUtf8Bytes) String added in v0.76.0

func (msg ValidUtf8Bytes) String() string

func (*ValidUtf8Bytes) UnmarshalText added in v0.76.0

func (msg *ValidUtf8Bytes) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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