Documentation ¶
Index ¶
- 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 ¶
This section is empty.
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 BaseConfig *otelconfig.OTELConfig `name:"base"` Logger *log.Logger PluginConfigs []*otelconfig.OTELConfig `group:"plugin-config"` StatusRegistry status.Registry Readiness *jobs.MultiJob `name:"readiness.service"` }
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 )