otelcollector

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReceiverFactoriesFxTag  = "otel-collector-receiver-factories"
	ProcessorFactoriesFxTag = "otel-collector-processor-factories"
)

FX tags used to pass OTel Collector factories.

Variables

This section is empty.

Functions

func EnforceExcludeList added in v0.1.3

func EnforceExcludeList(attributes pcommon.Map, excludeList map[string]bool)

EnforceExcludeList enforces the given exclude list on the given attributes.

func EnforceIncludeList added in v0.1.3

func EnforceIncludeList(attributes pcommon.Map, includeList map[string]bool)

EnforceIncludeList enforces the given include list on the given attributes.

func FormExcludeList added in v0.1.3

func FormExcludeList(attributes []string) map[string]bool

FormExcludeList returns a map of all the keys in the given list with a value of false.

func FormIncludeList added in v0.1.3

func FormIncludeList(attributes []string) map[string]bool

FormIncludeList returns a map of all the keys in the given list with a value of true.

func GetFloat64 added in v0.1.3

func GetFloat64(attributes pcommon.Map, key string, treatAsMissing []string) (float64, bool)

GetFloat64 returns float64 value from given attribute map at given key.

func GetStruct added in v0.1.3

func GetStruct(attributes pcommon.Map, label string, output interface{}, treatAsMissing []string) bool

GetStruct is a helper for decoding complex structs encoded into an attribute as string.

The attribute can be encoded as either: * JSON. * base64'd protobuf wire format, if `output` is `proto.Message`.

Takes: attributes to read from label key to read in attributes output interface that is filled via json/proto unmarshal treatAsMissing is a list of values that are treated as attribute missing from source

Returns true is label was decoded successfully, false otherwise.

func IterateDataPoints

func IterateDataPoints(metric pmetric.Metric, fn func(pcommon.Map))

IterateDataPoints calls given function for each metric data point.

func IterateLogRecords

func IterateLogRecords(ld plog.Logs, fn func(plog.LogRecord) IterAction)

IterateLogRecords calls given function for each logRecord.

The callback should return whether a log record should be kept or removed.

func IterateMetrics

func IterateMetrics(md pmetric.Metrics, fn func(pmetric.Metric))

IterateMetrics calls given function for each metric.

func IterateResourceMetrics added in v0.22.0

func IterateResourceMetrics(md pmetric.Metrics, fn func(pmetric.ResourceMetrics))

IterateResourceMetrics calls given function for each metric.

func IterateSpans

func IterateSpans(td ptrace.Traces, fn func(ptrace.Span))

IterateSpans calls given function for each span.

func Max added in v0.1.3

func Max(a, b float64) float64

Max returns the maximum value of the given values.

func Min added in v0.1.3

func Min(a, b float64) float64

Min returns the minimum value of the given values.

func Module

func Module() fx.Option

Module is a fx module that invokes OTel Collector.

Types

type ConstructorIn

type ConstructorIn struct {
	fx.In
	Factories        otelcol.Factories
	Lifecycle        fx.Lifecycle
	Shutdowner       fx.Shutdowner
	Unmarshaller     config.Unmarshaller
	StatusRegistry   status.Registry
	BaseConfig       *otelconfig.OTelConfig `name:"base"`
	Logger           *log.Logger
	Readiness        *jobs.MultiJob           `name:"readiness.service"`
	ExtensionConfigs []*otelconfig.OTelConfig `group:"extension-config"`
}

ConstructorIn describes parameters passed to create OTel Collector, server providing the OpenTelemetry Collector service.

type IterAction added in v0.12.0

type IterAction bool

IterAction describes whether to keep or discard an item processed by an iteration callback.

const (
	// Keep means keep this item and continue.
	Keep IterAction = true
	// Discard means remove this item and continue.
	Discard = false
)

Directories

Path Synopsis
Package adapterconnector adapts OTEL signals between pipelines.
Package adapterconnector adapts OTEL signals between pipelines.
+kubebuilder:validation:Optional
+kubebuilder:validation:Optional
Leader-only-receiver wraps any metrics receiver and starts it only when agent is a leader.
Leader-only-receiver wraps any metrics receiver and starts it only when agent is a leader.

Jump to

Keyboard shortcuts

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