Documentation ¶
Index ¶
- Constants
- func EnforceExcludeList(attributes pcommon.Map, excludeList map[string]bool)
- func EnforceIncludeList(attributes pcommon.Map, includeList map[string]bool)
- func FormExcludeList(attributes []string) map[string]bool
- func FormIncludeList(attributes []string) map[string]bool
- func GetFloat64(attributes pcommon.Map, key string, treatAsMissing []string) (float64, bool)
- func GetStruct(attributes pcommon.Map, label string, output interface{}, ...) bool
- func IterateDataPoints(metric pmetric.Metric, fn func(pcommon.Map))
- func IterateLogRecords(ld plog.Logs, fn func(plog.LogRecord) IterAction)
- func IterateMetrics(md pmetric.Metrics, fn func(pmetric.Metric))
- func IterateResourceMetrics(md pmetric.Metrics, fn func(pmetric.ResourceMetrics))
- func IterateSpans(td ptrace.Traces, fn func(ptrace.Span))
- func Max(a, b float64) float64
- func Min(a, b float64) float64
- func Module() fx.Option
- type ConstructorIn
- type IterAction
Constants ¶
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
EnforceExcludeList enforces the given exclude list on the given attributes.
func EnforceIncludeList ¶ added in v0.1.3
EnforceIncludeList enforces the given include list on the given attributes.
func FormExcludeList ¶ added in v0.1.3
FormExcludeList returns a map of all the keys in the given list with a value of false.
func FormIncludeList ¶ added in v0.1.3
FormIncludeList returns a map of all the keys in the given list with a value of true.
func GetFloat64 ¶ added in v0.1.3
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 ¶
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 ¶
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 ¶
IterateSpans calls given function for each span.
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 |
---|---|
+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. |