logrouter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceLogSources is the resource key for the adx-mon/log-sources annotation.
	// Format: sourceVal:DB:Table[,sourceVal:DB:Table,...]
	// Routes logs to a specific database and table based on the "source" field in the log body.
	ResourceLogSources = "adx-mon/log-sources"

	// ResourceLogKeys is the resource key for the adx-mon/log-keys annotation.
	// Format: key:value:DB:Table[,key:value:DB:Table,...]
	// Routes logs to a specific database and table based on arbitrary key/value matches in the log body.
	ResourceLogKeys = "adx-mon/log-keys"
)

Variables

This section is empty.

Functions

func FromConfigMap

func FromConfigMap(config map[string]interface{}) (types.Transformer, error)

Types

type Transform

type Transform struct{}

Transform is a built-in log transform that routes logs to different databases and tables based on pod annotations.

It supports two annotation-driven routing mechanisms:

  • adx-mon/log-sources: Routes based on the "source" field in the log body. Each entry maps a source value to a destination database:table pair.

  • adx-mon/log-keys: Routes based on an arbitrary body key matching a specific value. Each entry maps a key:value pair to a destination database:table pair.

Log-sources is evaluated first. If a match is found, log-keys is skipped.

func NewTransform

func NewTransform() *Transform

func (*Transform) Close

func (t *Transform) Close() error

func (*Transform) Name

func (t *Transform) Name() string

func (*Transform) Open

func (t *Transform) Open(ctx context.Context) error

func (*Transform) Transform

func (t *Transform) Transform(ctx context.Context, batch *types.LogBatch) (*types.LogBatch, error)

Jump to

Keyboard shortcuts

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