spanlogs

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package spanlogs provides an otelcol.connector.spanlogs component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	Overrides: OverrideConfig{
		LogsTag:     "traces",
		ServiceKey:  "svc",
		SpanNameKey: "span",
		StatusKey:   "status",
		DurationKey: "dur",
		TraceIDKey:  "tid",
	},
}

DefaultArguments holds default settings for Arguments.

Functions

func NewConsumer

func NewConsumer(args Arguments, nextConsumer otelconsumer.Logs) (*consumer, error)

Types

type Arguments

type Arguments struct {
	Spans             bool           `alloy:"spans,attr,optional"`
	Roots             bool           `alloy:"roots,attr,optional"`
	Processes         bool           `alloy:"processes,attr,optional"`
	SpanAttributes    []string       `alloy:"span_attributes,attr,optional"`
	ProcessAttributes []string       `alloy:"process_attributes,attr,optional"`
	Overrides         OverrideConfig `alloy:"overrides,block,optional"`
	Labels            []string       `alloy:"labels,attr,optional"`

	// Output configures where to send processed data. Required.
	Output *otelcol.ConsumerArguments `alloy:"output,block"`
}

Arguments configures the otelcol.connector.spanlogs component.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

type Component

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

Component is the otelcol.exporter.spanlogs component.

func New

New creates a new otelcol.exporter.spanlogs component.

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run implements Component.

func (*Component) Update

func (c *Component) Update(newConfig component.Arguments) error

Update implements Component.

type OverrideConfig

type OverrideConfig struct {
	LogsTag     string `alloy:"logs_instance_tag,attr,optional"`
	ServiceKey  string `alloy:"service_key,attr,optional"`
	SpanNameKey string `alloy:"span_name_key,attr,optional"`
	StatusKey   string `alloy:"status_key,attr,optional"`
	DurationKey string `alloy:"duration_key,attr,optional"`
	TraceIDKey  string `alloy:"trace_id_key,attr,optional"`
}

Jump to

Keyboard shortcuts

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