otelcollector

package
v2.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnforceExcludeList

func EnforceExcludeList(attributes pcommon.Map, excludeList utils.Set[string])

EnforceExcludeList enforces the given exclude list on the given attributes.

func EnforceIncludeList

func EnforceIncludeList(attributes pcommon.Map, includeList utils.Set[string])

EnforceIncludeList enforces the given include list on the given attributes.

func GetFloat64

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

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

func GetStruct

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

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

func Max(a, b float64) float64

Max returns the maximum value of the given values.

func Min

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
	ConfigProvider *otelconfig.Provider
	Logger         *log.Logger
	Readiness      *jobs.MultiJob `name:"readiness.service"`
}

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

type IterAction

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