From 99bce357d03a4583b1c8dfef865e41713a3d9f16 Mon Sep 17 00:00:00 2001 From: Peter Stranak Date: Sat, 4 Jan 2025 23:41:36 +0100 Subject: [PATCH] Update OTEL Collector to v116 --- src/cmd/components.go | 54 +- src/cmd/go.mod | 259 ++++----- src/cmd/go.sum | 535 +++++++++--------- src/internal/coreinternal/go.mod | 2 +- src/internal/coreinternal/go.sum | 40 +- src/internal/k8sconfig/config.go | 1 - src/internal/k8sconfig/go.mod | 6 +- src/internal/k8sconfig/go.sum | 12 +- .../k8sattributesprocessor/client_test.go | 26 +- .../k8sattributesprocessor/config.go | 9 +- .../k8sattributesprocessor/config_test.go | 13 +- .../k8sattributesprocessor/factory.go | 58 +- .../k8sattributesprocessor/factory_test.go | 9 + .../generated_component_telemetry_test.go | 16 +- src/processor/k8sattributesprocessor/go.mod | 68 +-- src/processor/k8sattributesprocessor/go.sum | 120 ++-- .../internal/kube/client.go | 153 ++--- .../internal/kube/client_resource.go | 16 +- .../internal/kube/client_resource_test.go | 106 ++-- .../internal/kube/client_test.go | 314 +++++++--- .../internal/kube/fake_informer.go | 7 +- .../internal/kube/fake_informer_resource.go | 2 +- .../internal/kube/informer.go | 2 - .../internal/kube/kube.go | 4 +- .../metadata/generated_config_test.go | 7 +- .../metadata/generated_resource_test.go | 42 +- .../internal/metadata/generated_status.go | 10 +- .../internal/metadata/generated_telemetry.go | 65 +-- .../metadata/generated_telemetry_resource.go | 72 +-- .../metadata/generated_telemetry_test.go | 10 +- .../k8sattributesprocessor/options.go | 17 + .../k8sattributesprocessor/options_test.go | 27 +- .../k8sattributesprocessor/processor.go | 83 +-- .../processor_resource.go | 4 +- .../processor_resource_test.go | 2 + .../k8sattributesprocessor/processor_test.go | 214 +++++-- .../testdata/config.yaml | 2 +- 37 files changed, 1401 insertions(+), 986 deletions(-) diff --git a/src/cmd/components.go b/src/cmd/components.go index 385dc79d..fa5b3452 100644 --- a/src/cmd/components.go +++ b/src/cmd/components.go @@ -65,9 +65,9 @@ func components() (otelcol.Factories, error) { } factories.ExtensionModules = make(map[component.Type]string, len(factories.Extensions)) - factories.ExtensionModules[healthcheckextension.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.113.0" - factories.ExtensionModules[filestorage.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.113.0" - factories.ExtensionModules[k8sobserver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.113.0" + factories.ExtensionModules[healthcheckextension.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.116.0" + factories.ExtensionModules[filestorage.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.116.0" + factories.ExtensionModules[k8sobserver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.116.0" factories.Receivers, err = receiver.MakeFactoryMap( prometheusreceiver.NewFactory(), @@ -85,15 +85,15 @@ func components() (otelcol.Factories, error) { } factories.ReceiverModules = make(map[component.Type]string, len(factories.Receivers)) - factories.ReceiverModules[prometheusreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.113.0" - factories.ReceiverModules[k8seventsreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.113.0" - factories.ReceiverModules[k8sobjectsreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.113.0" - factories.ReceiverModules[filelogreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.113.0" - factories.ReceiverModules[journaldreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.113.0" - factories.ReceiverModules[windowseventlogreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.113.0" - factories.ReceiverModules[otlpreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0" - factories.ReceiverModules[receivercreator.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.113.0" - factories.ReceiverModules[simpleprometheusreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.113.0" + factories.ReceiverModules[prometheusreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.116.0" + factories.ReceiverModules[k8seventsreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.116.0" + factories.ReceiverModules[k8sobjectsreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.116.0" + factories.ReceiverModules[filelogreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.116.0" + factories.ReceiverModules[journaldreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.116.0" + factories.ReceiverModules[windowseventlogreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.116.0" + factories.ReceiverModules[otlpreceiver.NewFactory().Type()] = "go.opentelemetry.io/collector/receiver/otlpreceiver v0.116.0" + factories.ReceiverModules[receivercreator.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.116.0" + factories.ReceiverModules[simpleprometheusreceiver.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.116.0" factories.Exporters, err = exporter.MakeFactoryMap( otlpexporter.NewFactory(), @@ -103,7 +103,7 @@ func components() (otelcol.Factories, error) { } factories.ExporterModules = make(map[component.Type]string, len(factories.Exporters)) - factories.ExporterModules[otlpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlpexporter v0.113.0" + factories.ExporterModules[otlpexporter.NewFactory().Type()] = "go.opentelemetry.io/collector/exporter/otlpexporter v0.116.0" factories.Processors, err = processor.MakeFactoryMap( batchprocessor.NewFactory(), @@ -125,19 +125,19 @@ func components() (otelcol.Factories, error) { } factories.ProcessorModules = make(map[component.Type]string, len(factories.Processors)) - factories.ProcessorModules[batchprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/batchprocessor v0.113.0" - factories.ProcessorModules[memorylimiterprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0" - factories.ProcessorModules[metricstransformprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.113.0" - factories.ProcessorModules[transformprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0" - factories.ProcessorModules[groupbyattrsprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.113.0" - factories.ProcessorModules[resourceprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0" - factories.ProcessorModules[deltatorateprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.113.0" - factories.ProcessorModules[cumulativetodeltaprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.113.0" - factories.ProcessorModules[metricsgenerationprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.113.0" - factories.ProcessorModules[filterprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0" - factories.ProcessorModules[attributesprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0" - factories.ProcessorModules[swk8sattributesprocessor.NewFactory().Type()] = "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.113.0" - factories.ProcessorModules[resourcedetectionprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.113.0" + factories.ProcessorModules[batchprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/batchprocessor v0.116.0" + factories.ProcessorModules[memorylimiterprocessor.NewFactory().Type()] = "go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.116.0" + factories.ProcessorModules[metricstransformprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.116.0" + factories.ProcessorModules[transformprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.116.0" + factories.ProcessorModules[groupbyattrsprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.116.0" + factories.ProcessorModules[resourceprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.116.0" + factories.ProcessorModules[deltatorateprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.116.0" + factories.ProcessorModules[cumulativetodeltaprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.116.0" + factories.ProcessorModules[metricsgenerationprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.116.0" + factories.ProcessorModules[filterprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.116.0" + factories.ProcessorModules[attributesprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.116.0" + factories.ProcessorModules[swk8sattributesprocessor.NewFactory().Type()] = "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.116.0" + factories.ProcessorModules[resourcedetectionprocessor.NewFactory().Type()] = "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.116.0" factories.Connectors, err = connector.MakeFactoryMap( forwardconnector.NewFactory(), @@ -147,7 +147,7 @@ func components() (otelcol.Factories, error) { } factories.ConnectorModules = make(map[component.Type]string, len(factories.Connectors)) - factories.ConnectorModules[forwardconnector.NewFactory().Type()] = "go.opentelemetry.io/collector/connector/forwardconnector v0.113.0" + factories.ConnectorModules[forwardconnector.NewFactory().Type()] = "go.opentelemetry.io/collector/connector/forwardconnector v0.116.0" return factories, nil } diff --git a/src/cmd/go.mod b/src/cmd/go.mod index 752ca82d..836da29a 100644 --- a/src/cmd/go.mod +++ b/src/cmd/go.mod @@ -17,55 +17,56 @@ module github.com/solarwinds/swi-k8s-opentelemetry-collector go 1.23.0 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.113.0 - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.113.0 - github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.113.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.116.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.116.0 + github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.116.0 github.com/spf13/cobra v1.8.1 - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.113.0 - go.opentelemetry.io/collector/confmap v1.19.0 - go.opentelemetry.io/collector/confmap/provider/envprovider v1.19.0 - go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.0 - go.opentelemetry.io/collector/confmap/provider/httpprovider v1.19.0 - go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.19.0 - go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.19.0 - go.opentelemetry.io/collector/connector v0.113.0 - go.opentelemetry.io/collector/connector/forwardconnector v0.113.0 - go.opentelemetry.io/collector/exporter v0.113.0 - go.opentelemetry.io/collector/exporter/otlpexporter v0.113.0 - go.opentelemetry.io/collector/extension v0.113.0 - go.opentelemetry.io/collector/otelcol v0.113.0 - go.opentelemetry.io/collector/processor v0.113.0 - go.opentelemetry.io/collector/processor/batchprocessor v0.113.0 - go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0 - go.opentelemetry.io/collector/receiver v0.113.0 - go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0 - go.opentelemetry.io/otel v1.31.0 - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.7.0 - go.opentelemetry.io/otel/log v0.7.0 - go.opentelemetry.io/otel/sdk v1.31.0 - go.opentelemetry.io/otel/sdk/log v0.7.0 + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/component v0.116.0 + go.opentelemetry.io/collector/component/componenttest v0.116.0 + go.opentelemetry.io/collector/confmap v1.22.0 + go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0 + go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0 + go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0 + go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.22.0 + go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0 + go.opentelemetry.io/collector/connector v0.116.0 + go.opentelemetry.io/collector/connector/forwardconnector v0.116.0 + go.opentelemetry.io/collector/exporter v0.116.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.116.0 + go.opentelemetry.io/collector/extension v0.116.0 + go.opentelemetry.io/collector/otelcol v0.116.0 + go.opentelemetry.io/collector/processor v0.116.0 + go.opentelemetry.io/collector/processor/batchprocessor v0.116.0 + go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.116.0 + go.opentelemetry.io/collector/receiver v0.116.0 + go.opentelemetry.io/collector/receiver/otlpreceiver v0.116.0 + go.opentelemetry.io/otel v1.32.0 + go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 + go.opentelemetry.io/otel/log v0.8.0 + go.opentelemetry.io/otel/sdk v1.32.0 + go.opentelemetry.io/otel/sdk/log v0.8.0 golang.org/x/sys v0.28.0 - google.golang.org/grpc v1.67.1 + google.golang.org/grpc v1.68.1 ) require ( @@ -92,12 +93,12 @@ require ( github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 // indirect + github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.118.0 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker v27.3.1+incompatible // indirect + github.com/docker/docker v27.4.0+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/ebitengine/purego v0.8.1 // indirect @@ -123,7 +124,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-json v0.10.3 // indirect + github.com/goccy/go-json v0.10.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -140,7 +141,7 @@ require ( github.com/gophercloud/gophercloud v1.13.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect github.com/hashicorp/consul/api v1.30.0 // indirect github.com/hashicorp/cronexpr v1.1.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -168,7 +169,7 @@ require ( github.com/klauspost/compress v1.17.11 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/knadh/koanf/v2 v2.1.2 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-syslog/v4 v4.2.0 // indirect @@ -190,19 +191,19 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.113.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.113.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.116.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.116.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/openshift/api v3.9.0+incompatible // indirect @@ -216,15 +217,15 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.1 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 // indirect - github.com/shirou/gopsutil/v4 v4.24.10 // indirect - github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.113.0 // indirect - github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.113.0 // indirect + github.com/shirou/gopsutil/v4 v4.24.11 // indirect + github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.116.0 // indirect + github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.116.0 // indirect github.com/spf13/cast v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -237,66 +238,68 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/bbolt v1.3.11 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.113.0 // indirect - go.opentelemetry.io/collector/client v1.19.0 // indirect - go.opentelemetry.io/collector/component/componentstatus v0.113.0 // indirect - go.opentelemetry.io/collector/config/configauth v0.113.0 // indirect - go.opentelemetry.io/collector/config/configcompression v1.19.0 // indirect - go.opentelemetry.io/collector/config/configgrpc v0.113.0 // indirect - go.opentelemetry.io/collector/config/confighttp v0.113.0 // indirect - go.opentelemetry.io/collector/config/confignet v1.19.0 // indirect - go.opentelemetry.io/collector/config/configopaque v1.19.0 // indirect - go.opentelemetry.io/collector/config/configretry v1.19.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.113.0 // indirect - go.opentelemetry.io/collector/config/configtls v1.19.0 // indirect - go.opentelemetry.io/collector/config/internal v0.113.0 // indirect - go.opentelemetry.io/collector/connector/connectorprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/connector/connectortest v0.113.0 // indirect - go.opentelemetry.io/collector/consumer v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumererror v0.114.0 // indirect - go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumertest v0.113.0 // indirect - go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/exporter/exporterprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/exporter/exportertest v0.113.0 // indirect - go.opentelemetry.io/collector/extension/auth v0.113.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.113.0 // indirect - go.opentelemetry.io/collector/extension/extensioncapabilities v0.113.0 // indirect - go.opentelemetry.io/collector/featuregate v1.19.0 // indirect - go.opentelemetry.io/collector/internal/fanoutconsumer v0.113.0 // indirect - go.opentelemetry.io/collector/internal/memorylimiter v0.113.0 // indirect - go.opentelemetry.io/collector/internal/sharedcomponent v0.113.0 // indirect - go.opentelemetry.io/collector/pdata v1.20.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.114.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.114.0 // indirect - go.opentelemetry.io/collector/pipeline v0.113.0 // indirect - go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/processor/processortest v0.113.0 // indirect - go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/receiver/receivertest v0.113.0 // indirect - go.opentelemetry.io/collector/semconv v0.113.0 // indirect - go.opentelemetry.io/collector/service v0.113.0 // indirect + go.opentelemetry.io/collector v0.116.0 // indirect + go.opentelemetry.io/collector/client v1.22.0 // indirect + go.opentelemetry.io/collector/component/componentstatus v0.116.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.116.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.22.0 // indirect + go.opentelemetry.io/collector/config/configgrpc v0.116.0 // indirect + go.opentelemetry.io/collector/config/confighttp v0.116.0 // indirect + go.opentelemetry.io/collector/config/confignet v1.22.0 // indirect + go.opentelemetry.io/collector/config/configopaque v1.22.0 // indirect + go.opentelemetry.io/collector/config/configretry v1.22.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.116.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.22.0 // indirect + go.opentelemetry.io/collector/config/internal v0.116.0 // indirect + go.opentelemetry.io/collector/connector/connectortest v0.116.0 // indirect + go.opentelemetry.io/collector/connector/xconnector v0.116.0 // indirect + go.opentelemetry.io/collector/consumer v1.22.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.116.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.116.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.116.0 // indirect + go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 // indirect + go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.116.0 // indirect + go.opentelemetry.io/collector/exporter/exportertest v0.116.0 // indirect + go.opentelemetry.io/collector/exporter/xexporter v0.116.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.116.0 // indirect + go.opentelemetry.io/collector/extension/experimental/storage v0.116.0 // indirect + go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0 // indirect + go.opentelemetry.io/collector/extension/extensiontest v0.116.0 // indirect + go.opentelemetry.io/collector/featuregate v1.22.0 // indirect + go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0 // indirect + go.opentelemetry.io/collector/internal/memorylimiter v0.116.0 // indirect + go.opentelemetry.io/collector/internal/sharedcomponent v0.116.0 // indirect + go.opentelemetry.io/collector/pdata v1.22.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.116.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect + go.opentelemetry.io/collector/pipeline v0.116.0 // indirect + go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 // indirect + go.opentelemetry.io/collector/processor/processortest v0.116.0 // indirect + go.opentelemetry.io/collector/processor/xprocessor v0.116.0 // indirect + go.opentelemetry.io/collector/receiver/receivertest v0.116.0 // indirect + go.opentelemetry.io/collector/receiver/xreceiver v0.116.0 // indirect + go.opentelemetry.io/collector/semconv v0.116.0 // indirect + go.opentelemetry.io/collector/service v0.116.0 // indirect go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 // indirect go.opentelemetry.io/contrib/config v0.10.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.53.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.54.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.31.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect - go.opentelemetry.io/otel/metric v1.31.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect - go.opentelemetry.io/otel/trace v1.31.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect @@ -304,7 +307,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.33.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect golang.org/x/sync v0.10.0 // indirect golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.21.0 // indirect @@ -312,16 +315,16 @@ require ( golang.org/x/tools v0.23.0 // indirect gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/api v0.188.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.31.2 // indirect - k8s.io/apimachinery v0.31.2 // indirect - k8s.io/client-go v0.31.2 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/client-go v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect @@ -330,8 +333,8 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -replace github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.113.0 => ../processor/k8sattributesprocessor +replace github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor v0.116.0 => ../processor/k8sattributesprocessor -replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.113.0 => ../internal/k8sconfig +replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.116.0 => ../internal/k8sconfig -replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.113.0 => ../internal/coreinternal +replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.116.0 => ../internal/coreinternal diff --git a/src/cmd/go.sum b/src/cmd/go.sum index be307f8e..e6fb1329 100644 --- a/src/cmd/go.sum +++ b/src/cmd/go.sum @@ -125,8 +125,8 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= +github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -143,8 +143,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= -github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.4.0+incompatible h1:I9z7sQ5qyzO0BfAb9IMOawRkAGxhYsidKiTMcm0DU+A= +github.com/docker/docker v27.4.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -235,8 +235,8 @@ github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= -github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM= +github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -332,8 +332,8 @@ github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc h1:GN2Lv3MGO7AS6PrRoT6yV5+wkrOpcszoIsO4+4ds248= github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGhpgPL+rXZ5nsZieVzvarn86asRlBg4uNGnk= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/hashicorp/consul/api v1.30.0 h1:ArHVMMILb1nQv8vZSGIwwQd2gtc+oSQZ6CalyiyH2XQ= github.com/hashicorp/consul/api v1.30.0/go.mod h1:B2uGchvaXVW2JhFoS8nqTxMD5PBykr4ebY4JWHTTeLM= github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg= @@ -433,8 +433,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -537,88 +537,88 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.113.0 h1:sYEmpMeBGMSoy8j1GSEkBO5GM578Qtq3QtmVcsYn51s= -github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.113.0/go.mod h1:ULlXfiJdXw0ZzUGXLToQvGb1gQuIGC2BjtfyTnw3QtE= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.113.0 h1:Aej9sL1v25Xf8AfM1fyRluBLV5g5+40GnagCb0/UJfY= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.113.0/go.mod h1:QiXedkQif06vbjtVgnmmrHOunLUoLLAf10uaA/qKgts= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.113.0 h1:DLVAun5qoedOzWZ1+yoZRuGj0RonhrGAqdAOO7k6k+A= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.113.0/go.mod h1:betAqGGfDFb8SLyMYBwH9BQyB9wzxWOWXXC/Ht6/kas= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.113.0 h1:9xbLur+qeUwlKDrx9LGI9fvypussD2E00q6QFkkGpGo= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.113.0/go.mod h1:l58b3KahydKLOzt7S0s0NYBYH9Nm8tZ4w/GIVvOLCWU= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.113.0 h1:ERdOiTmsDruI/s5oEgN45NsZW2roWXmO0u2aceR4GuM= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.113.0/go.mod h1:RkClsQhl8hdAg874Ot4kaG92s+6dW0Dvlt5HRxhsavc= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.113.0 h1:HqcOaYcj3SdjQhjCL7tuFWEwW7XoJPEW9Ml96gCG76M= -github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.113.0/go.mod h1:ZJ2KzF6dG0TRZfVtKP1KiwzWd+4+Vsj8xBFXbOJFWXc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.113.0 h1:qudJNiKFfxly/lPyfdZNwnT6OKCzRFw0BI0E5CI6WwU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.113.0/go.mod h1:eHVWQ484ohG4ZjaV8KTej3CMVEPh0w6zBXfi+qqvyGw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.113.0 h1:7A8MgFPYRQWq1RkFBktq01CW+eTYhiGML0IxQNv2uaM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.113.0/go.mod h1:E1pc7mDXH+5s7RyXw291h8lz2dhzPzaDrAHqP1Lawvw= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.113.0 h1:EZ/ZNsovNcQq+wwAbTAWNY+6BHnv24NxvVoC6eYmtg8= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.113.0/go.mod h1:u21dEQ9yQ0JyLMSrKLWWzHG/lHSlteNfa/EQ7Vqcle4= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.113.0 h1:SjzsWZqrxUoRWvXzwrbjQCnoJRJApJVCCqjrtflapMM= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.113.0/go.mod h1:sYIh0S63ztcL2q9gEKhvviDQ5caH1sFE1oeFRDQOQ6A= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.113.0 h1:E/D5TwJyKN19p1FQ0XD5r5G1uH9NH/HVAM0e1hFMwFU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.113.0/go.mod h1:FcClDm9XVV5tzUDzmH2Mhe6TfYiZ/3GSAQITnuCjZgg= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.113.0 h1:ZQ7HYLrsbbfrIYybOVDG4d1IS4PfxuZEll7lvLmcYDs= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.113.0/go.mod h1:2/6/eY8Uvg+NfYDsAbND96A4u5q4UjcDlBJolYcj6jE= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.113.0 h1:BidrOROxYyacsUzNJyPZdvuX9VpbmFnSJXAt0yz6cXU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.113.0/go.mod h1:TM5DUkjqHozcpjCX36f7cDv6Rv+J8ysZ52zCYAEQZCk= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.113.0 h1:V9CRl77lPG2xFPpnRf1QLiePo7FZngt+vw6M2KLdRMU= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.113.0/go.mod h1:zL+Msnlb1TEObHQ2RNnPKbVr3GhSdyI2ZqGtiSxg2/E= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.113.0 h1:SVvBEMYFwb+vq/bNg9TVHNCaiFYb79B8Ce2z0/sWBgc= -github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.113.0/go.mod h1:lRfw7YDJE82nmdTO14Sk5rzkFJPHyH1iAnWIkjyQgQk= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.113.0 h1:5YU2trp7n56EyDS9dEyY1UxyaW6wxB4KiyKoyjDYooo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.113.0/go.mod h1:EBtBK1lE/HMUz51cafBLlJAXZ/2ZDRCV4C+rT04fMYM= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.113.0 h1:e2WOkaj5AWPaKTU4l+GEXGrEUbrAhQPQ7zLUdnXLGX8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.113.0/go.mod h1:x+DR/o7xddbdhpQP2QKBJkPUdrj2tl/uR1OJ/sqlrWc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.113.0 h1:GERkhEtH3Uk8CMBzFoBmMD7fBfcrtIM9hopbQqzdvNs= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.113.0/go.mod h1:+VbefhdCgKiTXsIU6sQj9L96Ow53a8EMcUW6EMt3zTA= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.113.0 h1:Ux4k3jMTufk4HZ4RNYrqLxIt6wKEeOFAndzGWBjiUqs= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.113.0/go.mod h1:GWsSVmzpKZucOefuqqvKEUbnqGRV9OCSX2vzTjC/sbI= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.113.0 h1:n44G0Quw+OQMZ+ELOo/Aw1qcwVu7LXae8GBVjVSE+HQ= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.113.0/go.mod h1:6dxGDpWsWnzC5UK3RhgfdXRC+3c8RLCO+cC+RiS+jIU= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.113.0 h1:G8w+wg4nnqBqe297fBWnjJ5Tg2OYDVEMsdWA9/3ozxQ= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.113.0/go.mod h1:m3hDVsXPQzQfeji3+hn7NYJPHDRlHhQRNd5T7N5wZqc= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.113.0 h1:vKtNSM3VQBTJx1ecf+I1iqn4kj7fKif1SpBLQ+numf8= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.113.0/go.mod h1:Iw3ndTvDCbmN6uugOfIqmfb1pgCWTYg+tXXS2rr3QJo= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.113.0 h1:XzI7y1bC29bnJ9VgyA0JCws0e/rIyt7yteT5gGLe6nw= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.113.0/go.mod h1:OxdhzDFd7/cRck6LeWLF2TUC/QhwoJSUlw35NuVbvzA= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0 h1:z8DT+vL/NfRN2hpacLIqtCMcInFrM01CY9LtoFJq+jQ= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.113.0/go.mod h1:U0wBuG6Jz+DBzcPNCmRVZaZTXqaKC+RYo4eJiSKJwwk= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.113.0 h1:VHt8tWPRPzPjl2AzO6tAd86yboX1UDDFkBm6oDVNAoI= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.113.0/go.mod h1:r5DetWqG2vclbHNAYp4a+Kg5i7ZAfcRFez5bliTLDr0= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.113.0 h1:giZAz0AJTNJE3iYKDBzQGfiLDORqpbf2LrJw8j0kVlQ= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.113.0/go.mod h1:t/KGSEEJbvvoTicVQXH6aoZnQM/fMU5eu30uT+z8uH0= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0 h1:+eYxV9vp6u8fKM+9acEJYGUa3SD1vJF776c/haougNQ= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.113.0/go.mod h1:xSVeb2A5wmIuJ9Vak9UwPCP/yN1SDd+pBKfYHROW6YE= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.113.0 h1:WN/zA6sCT4VzCA9CpRTGj6wiu17vIFozm/0yxNwKeGs= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.113.0/go.mod h1:sqWPNepjCX0+Ye++N9HwJjJ7KUAOkn4/ML/2GzrZquQ= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.113.0 h1:Phph9JsXp5CAdCSCWJ+J4mfYx2qjmGNKiqd+4iFDuso= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.113.0/go.mod h1:MU6U2RYF4Xc2rNX2uBriBnyRhIETR+DzksuvV8zHiTE= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.113.0 h1:MN9P2YH7SUTLxQqGEmLsTKJ77qCSXBxHFE3seJxjH14= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.113.0/go.mod h1:2WUdA+8uuoNLofhsNDHLyejeVpVzAvyHMVw3jWpvOGE= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.113.0 h1:5cEQNFwYAn8PJ66l88lGLMSz9TYWiIUFayDwAtpJumw= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.113.0/go.mod h1:uSskqW6AAEHg/2yZ6hNo9V0OfQmM/wHP9lSNr2OSUU4= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0 h1:Syf4U5GrSl2fOGXBAChHrdSvMRBhi7BFiDwKbFkNo/8= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.113.0/go.mod h1:Q9shex5tQOoK4FeVx0NvYkwu18hCPFlRnwqqQzLfbpo= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0 h1:c4vPI/PrRPnueoaKJKzBztsASIn5yZ7BT7uc4PHR39E= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.113.0/go.mod h1:MR9VrhTtPazVAEWR/RPQln1i0Cmrc/6e2+zRpI/gwhM= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.113.0 h1:F4rPll42bwVC2tuoyG0f0LmjfoBMc5eNT0j7iDtbDXk= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.113.0/go.mod h1:GReM8iGTmB0zIH9A2vT3Ki5xP690A9RVycxB65dao38= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.113.0 h1:tlP0Zsowd6UzhvCgkpq2XCPZ9HWQlq8B39WSj8yup7w= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.113.0/go.mod h1:VWqOGypaJWlB1JV7d5zP03sy6MbNIrzVkq1OuJY75wE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.113.0 h1:vzSU/tdrq7U44Zw2z6zvS1SLUMp9hD89dX/sAFbmvMY= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.113.0/go.mod h1:CEjeyXSfA+/HaWbulyHMUQlbNseMq4jIC0gExAhbVXg= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.113.0 h1:owfBinZPPoywUoKvxqxjoyT/neNN0Dslz/3yqNxP/WE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.113.0/go.mod h1:NFr0Yqr3uNTAw4Z0QR8xN+3dUuvRCn5FGTRNBlfSuaw= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.113.0 h1:frNZmJqTjdGO4vkxM2LN5URbddpD+R8taOCtDz3JJiQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.113.0/go.mod h1:qFJOAhv+agSMdJSmsIW4QDsTWIdWo8NRZvY3OV2iWV8= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.113.0 h1:tIJu6tCPiZKK6FiBfn2ritlwMSrjwS4iNTI0u02J/ns= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.113.0/go.mod h1:cI/ZaTpiY6QDTihTwSKXgtsWXwSPr4Bpb95CjA1LO5Q= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.113.0 h1:KW4GMDAN8LVB8WqnLVftkKUVUGLj2aK/uMYg4DQMh0s= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.113.0/go.mod h1:CSDeNwxFltAFLbptXg2eazgN6V127v3rJA1EhLiHGbE= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.113.0 h1:Fc9DGWEUKKFQhIOEyXwwS0CfLAwVh7EFnoid08BLKlQ= -github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.113.0/go.mod h1:Ik8o6aAT4HVxwHcjW0+Pbk+M4nVV0039qSWgdKZbXcI= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.116.0 h1:kDPTGIKqGR52zV0vvGtJUi/dLgGO9lPCAJY+oUkO8gU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.116.0/go.mod h1:9DGVPNNo9jsJkwNG2PFlXM/NPd/rx9KG5nOmjva9CyA= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.116.0 h1:eHVusQ9W91qFZxsK0F/SUcvGDvwXWutlu6kaGqd8AXA= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.116.0/go.mod h1:wWYRKcuIcXprIPXYOWG9CsDcfCsi1b5eFKxG5cvoogQ= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.116.0 h1:xteN8oqqkDMe0DElO6tKDZ7d0/F2diH3nKjPOpYRjSI= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.116.0/go.mod h1:+GPzqBFeqV90U4/bntDRPMxo/i/12lxH7GyPJmqz4ls= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.116.0 h1:3wycso06hpLg8cH4F70WSl/z9sjONoRfeqRBWsJD/0o= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.116.0/go.mod h1:y6KQPKGMsgScsG0KrSc2lHzksP9Yf45enVE74ddsZ+g= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.116.0 h1:0MkHxKsm35xWibXRs4hPdQldI7DOhr0pil4cbQ9rOkY= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.116.0/go.mod h1:ueNOmFMNZYsp+o20TP/L92ieSmK88tyvmnAr5uEurhg= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.116.0 h1:ZsKouYvAe9f3BMKt7XIg3p9/a4sMwU+hvAc56RN0Ers= +github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.116.0/go.mod h1:VWlf7J/WyblP2hsmdhzdRkUNOMOoTrl7VImPwFvOJ7I= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.116.0 h1:fO7smdkD/B6O7gD401y463SGa/TNKabBM/GhA51z5Qk= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.116.0/go.mod h1:CSaMlqSG4lSOFW9pwhYFHkmHz2ZCTlcoS2rh9wRy1D0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.116.0 h1:va5jloH1Uwrnx8rymcG7ZqLJ49/zWGMz5Dy/iMm1JzI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.116.0/go.mod h1:WXJuadNLluxAiVZts1bAJbhAVurBpogToBbjtFKzie8= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.116.0 h1:xDbf946Zm0rTzWcYEyUfU0Ft2KthhaH4xrNm303vpbI= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.116.0/go.mod h1:yuIyOGmQJOn37u6NVfG8yOCzVvwboqnt+pjOSTvDeLo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.116.0 h1:5T7nt2K73pHYT131FTj9BjS6xdjIJZQ3fzp9nCB1dYo= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.116.0/go.mod h1:SY4FYy6K/cr63UY6ImhNSRy/1/WmK6fvSHsSpW+lT1Q= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.116.0 h1:apNG21F4adLWr1BUHJLqXBk//GtZ/rRHNGBqrc7zkGc= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.116.0/go.mod h1:Hp9uSq3qNJqdxu24u7RWyuPT9x1GgEUSx9US1LLeLi0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.116.0 h1:5AzFzOKEcdBaVAJprCX2kYBpTHIceyscPIsvF44aXcA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.116.0/go.mod h1:qlcnWnIph5WHlxpPJcFS/pe7LyhVvbDx/cstsOAB+xM= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.116.0 h1:mYuv39XJcULRd8I2jQE4ZLj9Z9im8oGUAEO/68spYqs= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.116.0/go.mod h1:9OF/jiKz0gCv+R3GhxmIpKpHE4mmNRbJ0g9g+WpGvT4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.116.0 h1:DkrbPF5kPCtdoi2dDxgv3zT1fYQn4KbNxq1MBqgaJ9U= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.116.0/go.mod h1:oa6vnMIde7Mb5qNocvRaba6TAytPsRRjnV/Ja+1I67g= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.116.0 h1:B4vA2+XhP1fncFxeaH9P1VNpEXKJIUgXGpvGGwbOPGg= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.116.0/go.mod h1:+0FjpCBgkcLsumJTuLInasEA67JaizGakt3PRAPbFpQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.116.0 h1:YENvOsl67sj8Ovvl5R8hKMnpPvdW3q5B7+CYYgy/GvQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.116.0/go.mod h1:D56LJWVbMc1Kdy7qa6HCrHH6ZOr4yr7YuVfp1rJn0es= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.116.0 h1:LCyHhStq7UbCHxCiTHIpGhhMWFv/mA1ecV6wduzicYw= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.116.0/go.mod h1:wpgb30Nj/PwrTBCRm4b1EQNHhk4P5uILvqogiKD2+2w= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.116.0 h1:RlEK9MbxWyBHbLel8EJ1L7DbYVLai9dZL6Ljl2cBgyA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.116.0/go.mod h1:AVUEyIjPb+0ARr7mhIkZkdNg3fd0ZcRhzAi53oZhl1Q= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.116.0 h1:jwnZYRBuPJnsKXE5H6ZvTEm91bXW5VP8+tLewzl54eg= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.116.0/go.mod h1:NT3Ag+DdnIAZQfD7l7OHwlYqnaAJ19SoPZ0nhD9yx4s= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.116.0 h1:AOIAG3j3o1Ww8Gfw9SeFIhGqHftxH65ljeHODVMxwDE= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.116.0/go.mod h1:Sis11Z5mNhfyL27DQOz16mZApsYYWC3Fmt/+WM4glqs= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.116.0 h1:iIyRBDNf8r6uYrRxnRkMIF8i+/xhy5R6NskcnjJ7V0Q= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.116.0/go.mod h1:rpkDoahVjYATJBjC8h9QTkaCLLKKdfRJRm7DY5E5wSQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.116.0 h1:coTfhsM6coyLEEC+Q+mSL8HnmajFScFg8Ib8Zn9/o9U= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.116.0/go.mod h1:8awtHOYwTq5FF/TiFwA058Ok0rVIf1NjWkVe9P7xXTQ= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.116.0 h1:91OcNxI5ZUSk6FUt20cBZW026lFKPKKsuFeuCc0Isi0= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.116.0/go.mod h1:FUwZ0OW87uLPsziHNDgAuW4+ZLseaCoGM0WIAPUhmlk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.116.0 h1:3qdGwEhZmRyepVnOwPTe4fk6WDKxUCivr6RHleX7hy4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.116.0/go.mod h1:FAuz4SFxKZwNgptL1BVarh6SEO4gQ1I7SclJScBBho4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.116.0 h1:+daFa0jsEaIgyEfGQfn/osSfKYaErOypxHNeytYYF08= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/cumulativetodeltaprocessor v0.116.0/go.mod h1:+nGFbElge3UAkSHzrPalOUYmGKcQGgKU8e6NZbRy1x8= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.116.0 h1:U60AuAEhclzPgymUu5jNLd3vfY8PICEqbAmOQD6z1J4= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/deltatorateprocessor v0.116.0/go.mod h1:RwV5OVbQEHJVQJFVWCpUdHZyB+EN82HIZ0JoDAmW2MU= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.116.0 h1:XHe77t+TheItR0xPgtmk3+ijTdXlkupCNXidzUEyjbc= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.116.0/go.mod h1:x/u2jTCynduMEoBbjSw5aq29E++NzjnXoMADtDEfpO0= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.116.0 h1:tXEQkkFyK6bGwcMzYfY2jpVQHpsFw7D+sivUU3PmDDw= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.116.0/go.mod h1:btH0O8Has1GnJO1od8owwcQStZGG6AvC45NCw6wKg8g= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.116.0 h1:0C5dZJP/P47zWVPLpDXIAG9v2WrvDSFmxsDWufxZ5bo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor v0.116.0/go.mod h1:KNXNVghhIeH/JueAakxoYwhb/gbdPib4/kwwNWYJ/6E= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.116.0 h1:WIuev2XbEyFNhr7WiZYuR6rG/ZocgSMIpnRqQGoAomo= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.116.0/go.mod h1:+Vq+WLSvMZW0159B0CsVnHpRIKzxNm64k7y6+MQLpnw= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.116.0 h1:nGMjoEVNHeYlUjeozhBtpZX+JQcgOsztDOIcaDvopYk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.116.0/go.mod h1:v56Tikc9K6GRNGn/p2tKmEHshsFV9B+6whDTjE0uXhw= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.116.0 h1:HhMas4fcQq5JhhKU77X/OebiSQvXDY+a10Rf9+mhDcs= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.116.0/go.mod h1:H1T/KD5SwsI/dQlavg0Bo+6gXuRYyxo0qdmCdLVbT0w= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.116.0 h1:a48/8x5VSZSSBkdifVC0mSgNtdJ0M0GcRtX98VVd4nk= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.116.0/go.mod h1:5MKetAGO0XkoZSqdoZhfxSoFq3hn7zmEYF4Yjf+i+CI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.116.0 h1:d4V7lQMbbg7Taw3Aoaj39qUvltzlILHwObpRtuVdshM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.116.0/go.mod h1:8zYjMguy93T3wMcUNaS3jqT4lCVo78TSeHs/J6oK3gY= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.116.0 h1:6yqSbJlUCoKE+4u+RYNRENpCbovM9MWYEJpWcTBKT5k= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.116.0/go.mod h1:z3OsnS183lw4YtPXVpuyGVoFEZQ6gsSop2kykxLqRAw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.116.0 h1:bdX7Z9OiQ3R/Aweunuv0XDR3FiikJdIFwMpdzJdr5Y4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.116.0/go.mod h1:wjpwSyV2QiJ1k3nlmMm+7Rfha6rYMknHApllZi+KLVM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.116.0 h1:0cNM0v16smHkBmIzlO+LLxaoQpp6sgvI4TcQqlzlii4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.116.0/go.mod h1:g6iyJIrXp7WX/m22VIMWluBi3jiL4REypKW65yqoIcI= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.116.0 h1:a++2CPNUqLJWafE6dYtcJRweSD4ayJCLToikrb1scwM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.116.0/go.mod h1:HW4ytncy0SeUdm1tcOVHMRf8K7V3rQ9dptpQlFn4JXs= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.116.0 h1:/q9qmoNvwsz1TEYgOwihmZV9kRuzPtP3mR0IVKQ+eAM= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.116.0/go.mod h1:dCMYRzceMAIKsp+BHLcWOz7us9fJPs2+CtZ7JYkWuK4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.116.0 h1:GxT5Z7AAYbfS/G/ADi65P6t8r8OKgDpJWsNe4aeDfp4= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/simpleprometheusreceiver v0.116.0/go.mod h1:dqHTym3uwNLQc5RVSmvI/75Aa52tLrOvSgo5KQyJTn8= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.116.0 h1:h3JZlkDCKQo7EP/dr41xp8p5dZ8lefD54Y7KyRTfYxw= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver v0.116.0/go.mod h1:ExCYwVEp0NS5EpLW3o0Qm+Wqj031pZonir9wTf3T9aQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -670,8 +670,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -694,8 +694,8 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 h1:BkTk4gynLjguayxrYxZoMZjBnA github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RYY7HkM= -github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= +github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8= +github.com/shirou/gopsutil/v4 v4.24.11/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -728,8 +728,9 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -738,8 +739,8 @@ github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I= github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= -github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= -github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tidwall/wal v1.1.8 h1:2qDSGdAdjaY3PEvHRva+9UFqgk+ef7cOiW1Qn5JH1y0= +github.com/tidwall/wal v1.1.8/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -769,128 +770,136 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.113.0 h1:dBuo2/OKBhoMCR86W4fFJLXGQ0gJfKRmi65AZwFkU2I= -go.opentelemetry.io/collector v0.113.0/go.mod h1:XbjD4Yw9LunLo3IJu3ZZytNZ0drEVznxw1Z14Ujlw3s= -go.opentelemetry.io/collector/client v1.19.0 h1:TUal8WV1agTrZStgE7BJ8ZC0IHLGtrfgO9ogU9t1mv8= -go.opentelemetry.io/collector/client v1.19.0/go.mod h1:jgiXMEM6l8L2QEyf2I/M47Zd8+G7e4z+6H8q5SkHOlQ= -go.opentelemetry.io/collector/component v0.113.0 h1:/nx+RvZgxUEXP+YcTj69rEtuSEGkfaCyp/ad5zQGLjU= -go.opentelemetry.io/collector/component v0.113.0/go.mod h1:2T779hIGHU9i7xbXbV3q1/JnRw2FyzUYXW2vq47A6EU= -go.opentelemetry.io/collector/component/componentstatus v0.113.0 h1:iNlUi+vDo7OqQwg4UOjfqqY3Xram4SkdcSZAyxt6QfE= -go.opentelemetry.io/collector/component/componentstatus v0.113.0/go.mod h1:NF/hVnP0kcsEqV9x14yMxN9GoehuOaVgMpO+s2KE+28= -go.opentelemetry.io/collector/config/configauth v0.113.0 h1:CBz43fGpN41MwLdwe3mw/XVSIDvGRMT8aaaPuqKukTU= -go.opentelemetry.io/collector/config/configauth v0.113.0/go.mod h1:Q8SlxrIvL3FJO51hXa4n9ARvox04lK8mmpjf4b3UNAU= -go.opentelemetry.io/collector/config/configcompression v1.19.0 h1:bTSjTLhnPXX1NSFM6GzguEM/NBe8QUPsXHc9kMOAJzE= -go.opentelemetry.io/collector/config/configcompression v1.19.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= -go.opentelemetry.io/collector/config/configgrpc v0.113.0 h1:rNbRd033JlIeU+TH+3bEt4OwRlEwrktWdf6V+VUJUPk= -go.opentelemetry.io/collector/config/configgrpc v0.113.0/go.mod h1:InXxPUj1oxJ57Sl954d2tQxXTgVHhfppFYjMwGjQukg= -go.opentelemetry.io/collector/config/confighttp v0.113.0 h1:a6iO0y1ZM5CPDvwbryzU+GpqAtAQ3eSfNseoAUogw7c= -go.opentelemetry.io/collector/config/confighttp v0.113.0/go.mod h1:JZ9EwoiWMIrXt5v+d/q54TeUhPdAoLDimSEqTtddW6E= -go.opentelemetry.io/collector/config/confignet v1.19.0 h1:gEDTd8zLx4pPpG5///XPRpbYUpvKsuQzDdM5IEULY9w= -go.opentelemetry.io/collector/config/confignet v1.19.0/go.mod h1:o3v4joAEjvLwntqexg5ixMqRrU1+Vst+jWuCUaBNgOg= -go.opentelemetry.io/collector/config/configopaque v1.19.0 h1:7uvntQeAAtqCaeiS2dDGrT1wLPhWvDlEsD3SliA/koQ= -go.opentelemetry.io/collector/config/configopaque v1.19.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= -go.opentelemetry.io/collector/config/configretry v1.19.0 h1:DEg8PXpo4ahMYgMzZZUU2cPcDF4vqowZlvimJ/t9InY= -go.opentelemetry.io/collector/config/configretry v1.19.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0 h1:hweTRrVddnUeA3k7HzRY4oUR9lRdMa7of3mHNUS5YyA= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/config/configtls v1.19.0 h1:GQ/cF1hgNqHVBq2oSSrOFXxVCyMDyd5kq4R/RMEbL98= -go.opentelemetry.io/collector/config/configtls v1.19.0/go.mod h1:1hyqnYB3JqEUlk1ME/s9HYz4oCRcxQCRxsJitFFT/cA= -go.opentelemetry.io/collector/config/internal v0.113.0 h1:9RAzH8v7ItFT1npHpvP0SvUzBHcZDliCGRo9Spp6v7c= -go.opentelemetry.io/collector/config/internal v0.113.0/go.mod h1:yC7E4h1Uj0SubxcFImh6OvBHFTjMh99+A5PuyIgDWqc= -go.opentelemetry.io/collector/confmap v1.19.0 h1:TQ0lZpAKqgsE0EKk+u4JA+uBbPYeFRmWP3GH43w40CY= -go.opentelemetry.io/collector/confmap v1.19.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.19.0 h1:f8O/I5pVRN86Gx5mHekNx92S6fGdOS4VcooRJKWe6Bs= -go.opentelemetry.io/collector/confmap/provider/envprovider v1.19.0/go.mod h1:AiaW5YW1LD0/WlZuc8eZuZPBH6PA9QqsiAYRX1iC6T0= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.0 h1:TYwyk4ea3U+5MYcEjrzZAaonBcLlabQu8CZeB7ekAYY= -go.opentelemetry.io/collector/confmap/provider/fileprovider v1.19.0/go.mod h1:i3mL4OSGI5JM0hnzHujhJK+LDlvO3XrJxBsuclfU/jY= -go.opentelemetry.io/collector/confmap/provider/httpprovider v1.19.0 h1:a077jcs3DVtaVdmgmCk3x4rRYuTkIqMDsoUc+VICHZk= -go.opentelemetry.io/collector/confmap/provider/httpprovider v1.19.0/go.mod h1:HjYkzhHbwUacv27nq0JLsslGpbtrXyyfU30Oc72AWLU= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.19.0 h1:8LoQxjlduFQUEwYuHWnxEj0A+GcAtpv2qPpDJVz7A5E= -go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.19.0/go.mod h1:Y8ErEl5m9+1AWzWcMn52PATH5dw50wuyyPMffK62RCI= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.19.0 h1:oV66DKiEdAt8EMZqGSChK2iEOxjrVaWRhf4OqqmqjbM= -go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.19.0/go.mod h1:jtNUdO6i1k38BG7vFst+d1jk/N+c419uVR8HB4J0VjI= -go.opentelemetry.io/collector/connector v0.113.0 h1:ii+s1CjsLxtglqRlFs6tv8UU/uX45dyN9lbTRbR0p8g= -go.opentelemetry.io/collector/connector v0.113.0/go.mod h1:KmA8eQouTVxVk65Bf6utuMjWovMuOvNVRcYV60CAGtc= -go.opentelemetry.io/collector/connector/connectorprofiles v0.113.0 h1:yAEKTxVGpBtHrrXeZFrBcVOQkduxCncH0o4hqKrDRyw= -go.opentelemetry.io/collector/connector/connectorprofiles v0.113.0/go.mod h1:+mwzwIZ1cEK29ByfC38uF8hmFO8Wf9ShT1c756XX+RI= -go.opentelemetry.io/collector/connector/connectortest v0.113.0 h1:WHekoL0izkrKLVQLv79v0QhqfnXkVcw0sgdF07EqWLM= -go.opentelemetry.io/collector/connector/connectortest v0.113.0/go.mod h1:KouywNfkxRf+yzbI2pdolzTLkLoCV4ASEI2o2pDt+Cg= -go.opentelemetry.io/collector/connector/forwardconnector v0.113.0 h1:XILhqBnK95lJTHBzCUCTCstCzpGCd+MsYldrYpNyeLA= -go.opentelemetry.io/collector/connector/forwardconnector v0.113.0/go.mod h1:am5CDAYY2ptK6gDbWAjO1nB1PkLsR100cv0wnTxgX20= -go.opentelemetry.io/collector/consumer v0.113.0 h1:KJSiK5vSIY9dgPxwKfQ3gOgKtQsqc+7IB7mGhUAL5c8= -go.opentelemetry.io/collector/consumer v0.113.0/go.mod h1:zHMlXYFaJlZoLCBR6UwWoyXZ/adcO1u2ydqUal3VmYU= -go.opentelemetry.io/collector/consumer/consumererror v0.114.0 h1:r2YiELfWerb40FHD23V04gNjIkLUcjEKGxI4Vtm2iO4= -go.opentelemetry.io/collector/consumer/consumererror v0.114.0/go.mod h1:MzIrLQ5jptO2egypolhlAbZsWZr29WC4FhSxQjnxcvg= -go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.113.0 h1:2kLIt+6dGmhCd48CWXh3IEon/uW4+c8y81IGCA/h8wE= -go.opentelemetry.io/collector/consumer/consumererror/consumererrorprofiles v0.113.0/go.mod h1:/eESy7Ifyf7G6r6WUpEOq2tnfjIJ2QNB2EvZcEu0aWA= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 h1:RftAcQUY5UOfbEK4s16jnORqTx16y9+PxA1lQwt98cQ= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0/go.mod h1:ZuHrQ4pWguh6dw0DgTfcUtdY/T+cnOJJNP6LMbm5Y5A= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0 h1:ua2AjNx3DUA8qElXNkggB4w3VDL/rBKBvryOQkhumH8= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0/go.mod h1:vK8o4ZTZSiG3rVyqxZcCNmT/cvEfx34ig7V65L9+6Rg= -go.opentelemetry.io/collector/exporter v0.113.0 h1:lDZJ6xfuhyLsT/7lqLhIN/ftA6G+9fuYFtubPFvNDxo= -go.opentelemetry.io/collector/exporter v0.113.0/go.mod h1:0W4NBf5NjWYxR8oJodmOybgN4O0MLazdJwwHevirvXg= -go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.113.0 h1:Auz2vZYReIlyDvJ162OCO8XcV7L2BIbFb5HJWxerc5A= -go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles v0.113.0/go.mod h1:JQuawcAfDuzNneDF5Ep1CZJ5snsLp6Bh1gZcHhja7yU= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.113.0 h1:8bsk3wYYNr+WAM5nZkFjiLYSTH9MsY2tm7nUpMWt3qc= -go.opentelemetry.io/collector/exporter/exporterprofiles v0.113.0/go.mod h1:/HFWF846XePYL/qKDtcEAFgkiGSkLUTaC59A5F48axM= -go.opentelemetry.io/collector/exporter/exportertest v0.113.0 h1:U6cRxjJS7td8iNriUI2QfEdH+Yj60ytyvpmnmKTw0+8= -go.opentelemetry.io/collector/exporter/exportertest v0.113.0/go.mod h1:SRz5jGyAjtNiWwJ93B1+Ndk1p3oFtQsyLw52UGeyRwc= -go.opentelemetry.io/collector/exporter/otlpexporter v0.113.0 h1://7diunG5SohqaYfqvHzCtcfrY7y3WQj0vklFYgeNW4= -go.opentelemetry.io/collector/exporter/otlpexporter v0.113.0/go.mod h1:THF0eq4lA6dYOho53iKFCBOv91HEeISZyep5dXr+fBU= -go.opentelemetry.io/collector/extension v0.113.0 h1:Vp/YSL8ZCkJQrP1lf2Bm5yaTvcp6ROO3AnfuSL3GEXM= -go.opentelemetry.io/collector/extension v0.113.0/go.mod h1:Pwp0TNqdHeER4V1I6H6oCvrto/riiOAqs3737BWCnjw= -go.opentelemetry.io/collector/extension/auth v0.113.0 h1:4ggRy1vepOabUiCWfU+6M9P/ftXojMUNAvBpeLihYj8= -go.opentelemetry.io/collector/extension/auth v0.113.0/go.mod h1:VbvAm2YZAqePkWgwn0m0vBaq3aC49CxPVwHmrJ24aeQ= -go.opentelemetry.io/collector/extension/experimental/storage v0.113.0 h1:Qq4IaB6bMUrf/bWoPZ5ESWywCt+vDi8I/ChYejIEPcc= -go.opentelemetry.io/collector/extension/experimental/storage v0.113.0/go.mod h1:BRmo+A7f06u/rhyLauU/Vogk+QRN0y1j2VVVgMGWrfQ= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.113.0 h1:GuJzpnrJtsMrKWGmb1VL4EqL6x1HDtZmtvy3yEjth6Y= -go.opentelemetry.io/collector/extension/extensioncapabilities v0.113.0/go.mod h1:oa72qndu7nAfEeEpDyDi9qLcaSJGIscLc/eeojFADx0= -go.opentelemetry.io/collector/extension/zpagesextension v0.113.0 h1:b/Clxso9uVwLVYjvRQ1NGBWHpUEZ/++uA5sJbBj0ryo= -go.opentelemetry.io/collector/extension/zpagesextension v0.113.0/go.mod h1:5csGYy9Ydfy6Hpw3Tod864P6HUEZpA6UiuPJPG3TjSU= -go.opentelemetry.io/collector/featuregate v1.19.0 h1:ASea2sU+tdpKI3RxIJC/pufDAfwAmrvcQ4EmTHVu0B0= -go.opentelemetry.io/collector/featuregate v1.19.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= -go.opentelemetry.io/collector/internal/fanoutconsumer v0.113.0 h1:Beu2zAN6/EDXQ6hMFU6FT1BsnU5FXmWNOlfTAhrgbGc= -go.opentelemetry.io/collector/internal/fanoutconsumer v0.113.0/go.mod h1:WUXbc4L6KJ3SpmsxBgId0OYzRDuS7n274kNpqrgnSmY= -go.opentelemetry.io/collector/internal/memorylimiter v0.113.0 h1:qe3xZYB4BgSuPDgFMQbcJ5gDy8t+S1vt6pL+OKrdx9E= -go.opentelemetry.io/collector/internal/memorylimiter v0.113.0/go.mod h1:Eo/XZsFPS1mo0DHnAaVeyPNFn3HKVXB2nog++b3CnRc= -go.opentelemetry.io/collector/internal/sharedcomponent v0.113.0 h1:a4gT+t+rboCaH70anhu+ZQp9IJ7UjVeZxZJvxTBgCqU= -go.opentelemetry.io/collector/internal/sharedcomponent v0.113.0/go.mod h1:6WDDyjI4pbtfUmtv/JKLs7OwieEEvaDVb3Zcc4oA9Vg= -go.opentelemetry.io/collector/otelcol v0.113.0 h1:t32gA8Pg9lsqYQml4mgvHdqFSsjvPZMvGywi0zXQYjk= -go.opentelemetry.io/collector/otelcol v0.113.0/go.mod h1:PV6pDLPEaulRs3ceWYNEDuG5100F35I5VzeC2ekT/vY= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.113.0 h1:bfu9oQQbO6KEcpgh7muc1ixsGQs+qFWwi9LyabGILqw= -go.opentelemetry.io/collector/otelcol/otelcoltest v0.113.0/go.mod h1:0bag/J2REbnIKKKHvYe0RqyjmsUv4OJH14kNef+lD4Q= -go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= -go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= -go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= -go.opentelemetry.io/collector/pdata/pprofile v0.114.0/go.mod h1:4aNcj6WM1n1uXyFSXlhVs4ibrERgNYsTbzcYI2zGhxA= -go.opentelemetry.io/collector/pdata/testdata v0.114.0 h1:+AzszWSL1i4K6meQ8rU0JDDW55SYCXa6FVqfDixhhTo= -go.opentelemetry.io/collector/pdata/testdata v0.114.0/go.mod h1:bv8XFdCTZxG2MQB5l9dKxSxf5zBrcodwO6JOy1+AxXM= -go.opentelemetry.io/collector/pipeline v0.113.0 h1:vSRzRe3717jV0btCNPhVkhg2lu0uFxcm2VO+vhad/eE= -go.opentelemetry.io/collector/pipeline v0.113.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= -go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.113.0 h1:PwQnErsLvEd1x6VIyjLmKQot9huKWqIfEz1kd+8aj4k= -go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.113.0/go.mod h1:tChJYsCG3wc6JPT9aJO3y+32V14NhmCFZOh3k5ORGdQ= -go.opentelemetry.io/collector/processor v0.113.0 h1:BQI6MsKtiCG9HT/nmiRXTKP6SZFrjFKVfM6pTQfbc0k= -go.opentelemetry.io/collector/processor v0.113.0/go.mod h1:oX91zMI8ZkoaYSUfUYflHiMiiBJPKtODNBUCrETLLd8= -go.opentelemetry.io/collector/processor/batchprocessor v0.113.0 h1:LPNbVILg+cKTFIi8ziIa2idZ5MRlBIf4Wr72gZNgXb0= -go.opentelemetry.io/collector/processor/batchprocessor v0.113.0/go.mod h1:tCg+B/1idJS5inxod+nRPXFdVi89Bsnl6RvzIOO9k5I= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0 h1:3/5z0Pe/yduwF0DSpytW2+mwDA5JaIL/w6vfNYy5KzQ= -go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.113.0/go.mod h1:h3wIlqMtJGIDKttjMJBo6J4dHU/Mi6+bKSxvRVUpsXs= -go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 h1:cczN6whdrCWww3T0FBV3U7lsVKQmkWDX05M+9lANHgk= -go.opentelemetry.io/collector/processor/processorprofiles v0.113.0/go.mod h1:4Dmx5qsvujgJ+MC+KqWI7UDVM2liXa3sH/9XnGiL9aE= -go.opentelemetry.io/collector/processor/processortest v0.113.0 h1:jGoDJ+tDCzuDcAWZeshQtnK/DQAvMKd4wZAIDgAM5aA= -go.opentelemetry.io/collector/processor/processortest v0.113.0/go.mod h1:tNg04r5KlpVx774jSC8U/oYst1eb7WIiz+0AjXKJ0Uw= -go.opentelemetry.io/collector/receiver v0.113.0 h1:vraAbkPy8Pz9x5X39gV+j9t6x23PNsY2aJ6gQMugRbQ= -go.opentelemetry.io/collector/receiver v0.113.0/go.mod h1:IUa8/lNw8Qh4L5Q3jOeRWKW0ebQPoNcfhytxN5Puq2A= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0 h1:yhnj8kmh1IQ4g6fIWvhum/wYPUU2WmRpQuy1iSvf4e4= -go.opentelemetry.io/collector/receiver/otlpreceiver v0.113.0/go.mod h1:3OB+oJlOb1rlLLdBwxae4g2Qh5C97Eg17HVveIddUCw= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0 h1:uVxuzjGe2t1sbwahSBowVHYnGzpzn8brmfn8z1UHvQg= -go.opentelemetry.io/collector/receiver/receiverprofiles v0.113.0/go.mod h1:khKDkzYJR2x2OPUqGSmoSncdINT9lUE5IThiHPDbqZk= -go.opentelemetry.io/collector/receiver/receivertest v0.113.0 h1:0vOvz3S4Q/KwcNCS9C7zPo0uxD6RSWktG88yGdxfV6g= -go.opentelemetry.io/collector/receiver/receivertest v0.113.0/go.mod h1:sRq5ctm5UE/0Ar562wnCVQ1zbAie/D127D1WbtbEuEc= -go.opentelemetry.io/collector/semconv v0.113.0 h1:twenSI7M7MJMJKW8D6a/GXxPZTPbama/weywBtV2iFw= -go.opentelemetry.io/collector/semconv v0.113.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= -go.opentelemetry.io/collector/service v0.113.0 h1:SFT+kWuj9TehC34MLEWfXH6QocGl3MYqLJ7UbxZtWzM= -go.opentelemetry.io/collector/service v0.113.0/go.mod h1:6+JY80Yd4J4RWpvRmpCUUZFOZKGVs9a1QKCKPlDrKfs= +go.opentelemetry.io/collector v0.116.0 h1:Dscd6Nsnc7hjFQosO0SofcPQsXRfcj5N5PjQAslnmj4= +go.opentelemetry.io/collector v0.116.0/go.mod h1:Ug2hpW0SINPmJAGVEALRlux78NTZc3YXSuh5/Q/hFrA= +go.opentelemetry.io/collector/client v1.22.0 h1:AAUzHuqYQqxoNqacw1WXgGF/MxtBTwNZuhBvJIorgA0= +go.opentelemetry.io/collector/client v1.22.0/go.mod h1:wcCSdTwbDVNTycoqs7BiDNVj3e1Ta7EnWH2sAofKnEk= +go.opentelemetry.io/collector/component v0.116.0 h1:SQE1YeVfYCN7bw1n4hknUwJE5U/1qJL552sDhAdSlaA= +go.opentelemetry.io/collector/component v0.116.0/go.mod h1:MYgXFZWDTq0uPgF1mkLSFibtpNqksRVAOrmihckOQEs= +go.opentelemetry.io/collector/component/componentstatus v0.116.0 h1:wpgY0H2K9IPBzaNAvavKziK86VZ7TuNFQbS9OC4Z6Cs= +go.opentelemetry.io/collector/component/componentstatus v0.116.0/go.mod h1:ZRlVwHFMGNfcsAywEJqivOn5JzDZkpe3KZVSwMWu4tw= +go.opentelemetry.io/collector/component/componenttest v0.116.0 h1:UIcnx4Rrs/oDRYSAZNHRMUiYs2FBlwgV5Nc0oMYfR6A= +go.opentelemetry.io/collector/component/componenttest v0.116.0/go.mod h1:W40HaKPHdBFMVI7zzHE7dhdWC+CgAnAC9SmWetFBATY= +go.opentelemetry.io/collector/config/configauth v0.116.0 h1:8Y5y18fxilLobjDqNHO5FvGhC5HKYupWhT1DB3KrFaw= +go.opentelemetry.io/collector/config/configauth v0.116.0/go.mod h1:2JZ5PRvNZcrBvPz1SjPWCwFQx7qXGVginb7AkFQu0iU= +go.opentelemetry.io/collector/config/configcompression v1.22.0 h1:B4UCZjW2IVootcEL3iZFnCp8BOhLKEnWkHXHSo23ewk= +go.opentelemetry.io/collector/config/configcompression v1.22.0/go.mod h1:LvYG00tbPTv0NOLoZN0wXq1F5thcxvukO8INq7xyfWU= +go.opentelemetry.io/collector/config/configgrpc v0.116.0 h1:O8Y1X9wDH5dDdqDJ9kqoaMrxEauaDSJBg9aNC6QgB7g= +go.opentelemetry.io/collector/config/configgrpc v0.116.0/go.mod h1:RPrSQrr6xhIaAK2DdcECi142NjSo0npQfVQB3nommSo= +go.opentelemetry.io/collector/config/confighttp v0.116.0 h1:MLI88LmGzlN5D4pH6nFMg5hU3UCeTZb72iVx1lWb0c8= +go.opentelemetry.io/collector/config/confighttp v0.116.0/go.mod h1:iJzNYVOiE1V3lpOIZIkR3JJk3aX/RGp9+SEssJMJ/bY= +go.opentelemetry.io/collector/config/confignet v1.22.0 h1:SBEMHJZWD8J4qgFw1O+BEkXW9AWldDi6Fz5YeDeoU58= +go.opentelemetry.io/collector/config/confignet v1.22.0/go.mod h1:ZppUH1hgUJOubawEsxsQ9MzEYFytqo2GnVSS7d4CVxc= +go.opentelemetry.io/collector/config/configopaque v1.22.0 h1:CJgsm/Ynr2JE5Y66hYJBdybjHs20ywHtBHiV1jlI4yE= +go.opentelemetry.io/collector/config/configopaque v1.22.0/go.mod h1:sW0t0iI/VfRL9VYX7Ik6XzVgPcR+Y5kejTLsYcMyDWs= +go.opentelemetry.io/collector/config/configretry v1.22.0 h1:gKZeYPvCho1+pO6ePRXkloA2nKUUFnA+yBUSHfOzJPU= +go.opentelemetry.io/collector/config/configretry v1.22.0/go.mod h1:cleBc9I0DIWpTiiHfu9v83FUaCTqcPXmebpLxjEIqro= +go.opentelemetry.io/collector/config/configtelemetry v0.116.0 h1:Vl49VCHQwBOeMswDpFwcl2HD8e9y94xlrfII3SR2VeQ= +go.opentelemetry.io/collector/config/configtelemetry v0.116.0/go.mod h1:SlBEwQg0qly75rXZ6W1Ig8jN25KBVBkFIIAUI1GiAAE= +go.opentelemetry.io/collector/config/configtls v1.22.0 h1:Bu+GZMBYCufYDF72Wup+3jIGNsHuQUvZpMEPjllmYus= +go.opentelemetry.io/collector/config/configtls v1.22.0/go.mod h1:CYFyMvbf10EoWhoFG8EYyxzFy4jcIPGIRMc8/HWLNQM= +go.opentelemetry.io/collector/config/internal v0.116.0 h1:RG4tvK6Ozzk/SBUPyTnGD+miya0U7Z7GSpCY92qIEUY= +go.opentelemetry.io/collector/config/internal v0.116.0/go.mod h1:OVkadRWlKAoWjHslqjWtBLAne8ceQm8WYT71ZcBWLFc= +go.opentelemetry.io/collector/confmap v1.22.0 h1:ZKQzRuj5lKu+seKArAAZ1yPRroDPricaIVIREm/jr3w= +go.opentelemetry.io/collector/confmap v1.22.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0 h1:AdHaQo/GSSRLJvEFLCMHo02r+u6Ed8j0/MNz7u3noug= +go.opentelemetry.io/collector/confmap/provider/envprovider v1.22.0/go.mod h1:InKYEGFdkwz3H2q648kT6rMCFBhPvevIW9ZbWIY5QR4= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0 h1:upFhnU8EyPp0WMR53mJIdx+UR2EGFOr+ppYKzUCY/Vg= +go.opentelemetry.io/collector/confmap/provider/fileprovider v1.22.0/go.mod h1:FhjMWU5nf3IctX27lVZomM5SKMyRywShRsA4/rHoBe8= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0 h1:jKLicfZRiA+G/sgso26aM6Dmmva4Dx9Txk2R58+R3e8= +go.opentelemetry.io/collector/confmap/provider/httpprovider v1.22.0/go.mod h1:nZhEGDufHuZAaeVyFVz15IluXwrnQRCp+U/w7j8Lx9Y= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.22.0 h1:SJy1cv/ChsEL+xzggMG0G0jJTF7RGWm1cqJmpUra8k0= +go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.22.0/go.mod h1:VOil+29aaVqPwk4kYJdH23ocA0PC8EjKEGxAeEqk/GQ= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0 h1:dkiNwLxBqeNDN5fIwtvr2GoA0I2xZB2SEdQ9ceBbJVs= +go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.22.0/go.mod h1:P9SxKZvim1C3K1R2j3gI+Qb4/l9MffX2sY5f9ajsk7Y= +go.opentelemetry.io/collector/connector v0.116.0 h1:0Pz8RAXH1swLeA1fiyGGQWdv0Kemz4mbq+jnmd1TACE= +go.opentelemetry.io/collector/connector v0.116.0/go.mod h1:VQiZ2yW9KhZuF0yjDbvlgrAxm7+o8KQoxHxurQWLjKU= +go.opentelemetry.io/collector/connector/connectortest v0.116.0 h1:MdttvjqdZmp0ewW5IPCEtzzYmCqxrQxsjJ5m6gMVjzA= +go.opentelemetry.io/collector/connector/connectortest v0.116.0/go.mod h1:ko7aPyvAVf6SvRhWGZdPXSyk+7zPmsSCcMq0gYPMMIQ= +go.opentelemetry.io/collector/connector/forwardconnector v0.116.0 h1:USMDkZwMH9hlQ95Eh1Y4WLKF3IbR8cZJ2tna9165zXo= +go.opentelemetry.io/collector/connector/forwardconnector v0.116.0/go.mod h1:GLhaRzl3W75GApUGut1jo77Q/tOHnSRf7E2/xsbR9KM= +go.opentelemetry.io/collector/connector/xconnector v0.116.0 h1:fFJzrRco0g7HMkhnQ+ehlvicFf58vzsCLXnfuHyQM8w= +go.opentelemetry.io/collector/connector/xconnector v0.116.0/go.mod h1:m9oCk32zX6wDciYBpy+qMQkWKtOxb0gAkEUm8+trflY= +go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= +go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= +go.opentelemetry.io/collector/consumer/consumererror v0.116.0 h1:GRPnuvwxUeHKVTRzy35di8OFlxypY4YWrK+1nWMsExM= +go.opentelemetry.io/collector/consumer/consumererror v0.116.0/go.mod h1:OvQvQ2V7sHT4Vz+1/4mwdEajWZNoFUsY1NhOM8rGvXo= +go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.116.0 h1:sSPDz4Qu7H86SrxtE6sQHDuWjFkTWHdKyGdsxhjZzcw= +go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.116.0/go.mod h1:0K7jbkCWtydn1IA3JwAUJeLVL79tJTxWoXR2gYTnCk0= +go.opentelemetry.io/collector/consumer/consumertest v0.116.0 h1:pIVR7FtQMNAzfxBUSMEIC2dX5Lfo3O9ZBfx+sAwrrrM= +go.opentelemetry.io/collector/consumer/consumertest v0.116.0/go.mod h1:cV3cNDiPnls5JdhnOJJFVlclrClg9kPs04cXgYP9Gmk= +go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 h1:ZrWvq7HumB0jRYmS2ztZ3hhXRNpUVBWPKMbPhsVGmZM= +go.opentelemetry.io/collector/consumer/xconsumer v0.116.0/go.mod h1:C+VFMk8vLzPun6XK8aMts6h4RaDjmzXHCPaiOxzRQzQ= +go.opentelemetry.io/collector/exporter v0.116.0 h1:Ps8sLPiGqJ4XGfmAVR6sxrtNBQOqAaWJvgqEOGxTvUU= +go.opentelemetry.io/collector/exporter v0.116.0/go.mod h1:9alTWZILqY8Y3L/YLdJHFA0sx/LJDgZZjng0PHsIJkU= +go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.116.0 h1:BzMvZf9RKRcQPFjGnQSEWvfI5Er9kXfzyZ/4GHkUTa4= +go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.116.0/go.mod h1:RCbA3MNnZPTy2mViwQxMlnrq5moJ1XgetNQx2XHIpaI= +go.opentelemetry.io/collector/exporter/exportertest v0.116.0 h1:2XEiNkBtvOq2+KzjM3OA92vlDATAi1Nn+xT9GT74QQc= +go.opentelemetry.io/collector/exporter/exportertest v0.116.0/go.mod h1:t3CYc//OqP5pxpIN/5tYJhVP/mmtyoc5vHkBCau2IkM= +go.opentelemetry.io/collector/exporter/otlpexporter v0.116.0 h1:2yA8fUW0R0hml2OFxfCmSdtdqpfCLqBGazJ8eALajgU= +go.opentelemetry.io/collector/exporter/otlpexporter v0.116.0/go.mod h1:hbK5ggV3hjsjdifV7oUQKhbjg0ijgIeK9BHixTAzuYo= +go.opentelemetry.io/collector/exporter/xexporter v0.116.0 h1:z97GOTSJu4qMkp21yeUWAo6gskMEJi2j8vdnakLcKgI= +go.opentelemetry.io/collector/exporter/xexporter v0.116.0/go.mod h1:9wWrMBpX6/s3dSx4mLf+QeEA8ZpYts4GdQkv4BOXEEg= +go.opentelemetry.io/collector/extension v0.116.0 h1:/PYrsAqb87XlC1Cra7I3mU6CDs+TAjqj7LO/9tXX9qk= +go.opentelemetry.io/collector/extension v0.116.0/go.mod h1:OF8pL6ioyT+f2V0CsEaM1EAmqaEMNCIgw7DS4agcOcc= +go.opentelemetry.io/collector/extension/auth v0.116.0 h1:oolKkFBIS4vhJ4ZWTD4Bp+35ATBf7dBsln63RKWAJm0= +go.opentelemetry.io/collector/extension/auth v0.116.0/go.mod h1:3WeZgIiiP7wcB+tID4G3ml6J/R2oJ359PxQh/pUFnSk= +go.opentelemetry.io/collector/extension/auth/authtest v0.116.0 h1:KcMvjb4R0wpkmmi7EOk7zT5sgl7uwXY/VQfMEUVYcLM= +go.opentelemetry.io/collector/extension/auth/authtest v0.116.0/go.mod h1:zyWTdh+CUKh7BbszTWUWp806NA6EDyix77O4Q6XaOA8= +go.opentelemetry.io/collector/extension/experimental/storage v0.116.0 h1:Pb0ljtJMtsdiJoLOWbtVIYAViLkcZUF3V9MUNHyzn1c= +go.opentelemetry.io/collector/extension/experimental/storage v0.116.0/go.mod h1:AQgDz5IJB4d9PExwV6RTlYkiVGp05/+/TAR9gCJpPJA= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0 h1:bXDgoiDiwFfrO5S6q1Wpe0su303CW4Qxthoy4CxG6eg= +go.opentelemetry.io/collector/extension/extensioncapabilities v0.116.0/go.mod h1:uFZlAPxk2+s6zk1W+u22DgxxSDugWy0QaY5kQzjNy7Q= +go.opentelemetry.io/collector/extension/extensiontest v0.116.0 h1:NEPis256V4pFVocdZH6gOdsGDueyOe9vvx/BE9QxMf0= +go.opentelemetry.io/collector/extension/extensiontest v0.116.0/go.mod h1:rpb4W2OimGXY5Oalk/NCemoPhgM03JZxBjXvlIveH5I= +go.opentelemetry.io/collector/extension/zpagesextension v0.116.0 h1:D0VY/ESPwkREfMaqJleGVTiCYoCs3MDipU93ywaIn68= +go.opentelemetry.io/collector/extension/zpagesextension v0.116.0/go.mod h1:MqkQSYKarMrjVSyGrAes1FBcsW6HDDPj/ouvcDvSjfk= +go.opentelemetry.io/collector/featuregate v1.22.0 h1:1TUcdqA5VpEsX1Lrr6GG15CptZxDXxiu5AXgwpeNSR4= +go.opentelemetry.io/collector/featuregate v1.22.0/go.mod h1:3GaXqflNDVwWndNGBJ1+XJFy3Fv/XrFgjMN60N3z7yg= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0 h1:KKFb3u8iLk4V5GYz7eVpw8QgEdob5koX6GNEbaoDQJY= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.116.0/go.mod h1:YyWHUWeSnRmy2CF7kPHpwJ6qkVjufbLZ8PYuY0Ph0o8= +go.opentelemetry.io/collector/internal/memorylimiter v0.116.0 h1:xLt/2jPHvaWQiNle66DsTz3kRbWoQ93AEMfSeKyCdN0= +go.opentelemetry.io/collector/internal/memorylimiter v0.116.0/go.mod h1:12KU4unWjF3nxrpOuuTi4TGK3KaD+kzmgA2Vd86MhWU= +go.opentelemetry.io/collector/internal/sharedcomponent v0.116.0 h1:5QhpnwgogQhBrcsOjk1Yhkugopj043XlSDB1lpHKCGo= +go.opentelemetry.io/collector/internal/sharedcomponent v0.116.0/go.mod h1:wMQM1Sqbj6J6jNVBb5hawkCfmqrLJ0hAeDKkalUfrEY= +go.opentelemetry.io/collector/otelcol v0.116.0 h1:8NoPEY2uAemwNzUcMxiZuuI8w/Ff+0p1DXXk6NVEGlk= +go.opentelemetry.io/collector/otelcol v0.116.0/go.mod h1:c/EhsBdHmC44SxhWMi7pTlYB+I6GBSJNBsj9NCwXMxM= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.116.0 h1:ZNg2kFLKnreaGSMfbr74k1yEbHLxG4ZbVvSIr+XleXo= +go.opentelemetry.io/collector/otelcol/otelcoltest v0.116.0/go.mod h1:TruQJSWWiDRlSYZTcLSE0GeECJZALDw8X8dvoYXUJ+A= +go.opentelemetry.io/collector/pdata v1.22.0 h1:3yhjL46NLdTMoP8rkkcE9B0pzjf2973crn0KKhX5UrI= +go.opentelemetry.io/collector/pdata v1.22.0/go.mod h1:nLLf6uDg8Kn5g3WNZwGyu8+kf77SwOqQvMTb5AXEbEY= +go.opentelemetry.io/collector/pdata/pprofile v0.116.0 h1:iE6lqkO7Hi6lTIIml1RI7yQ55CKqW12R2qHinwF5Zuk= +go.opentelemetry.io/collector/pdata/pprofile v0.116.0/go.mod h1:xQiPpjzIiXRFb+1fPxUy/3ygEZgo0Bu/xmLKOWu8vMQ= +go.opentelemetry.io/collector/pdata/testdata v0.116.0 h1:zmn1zpeX2BvzL6vt2dBF4OuAyFF2ml/OXcqflNgFiP0= +go.opentelemetry.io/collector/pdata/testdata v0.116.0/go.mod h1:ytWzICFN4XTDP6o65B4+Ed52JGdqgk9B8CpLHCeCpMo= +go.opentelemetry.io/collector/pipeline v0.116.0 h1:o8eKEuWEszmRpfShy7ElBoQ3Jo6kCi9ucm3yRgdNb9s= +go.opentelemetry.io/collector/pipeline v0.116.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= +go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 h1:PFNy+Il/kqPdPL9rhG+1kG63Aauya+FhBKGXoB6ivxU= +go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0/go.mod h1:bVn9V4TGyeXi58/JDkeXCuKtc+V+qcOoTl8hNpV0qa8= +go.opentelemetry.io/collector/processor v0.116.0 h1:Kyu4tPzTdWNHtZjcxvI/bGNAgyv8L8Kem2r/Mk4IDAw= +go.opentelemetry.io/collector/processor v0.116.0/go.mod h1:+/Ugy48RAxlZEXmN2cw51W8t5wdHS9No+GAoP+moskk= +go.opentelemetry.io/collector/processor/batchprocessor v0.116.0 h1:jZMC+jlay3xCBBjcL85oT8nMFB5B3zvvwS6lW6xVGAc= +go.opentelemetry.io/collector/processor/batchprocessor v0.116.0/go.mod h1:KmLVhDjnatsZm5xQkgRLl12lwvHohmk3djJXfu8m33c= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.116.0 h1:7YwVMfpr0igtILydBFDXJsEGskI/4FIKPqc0hGIjJIE= +go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.116.0/go.mod h1:nMEGCezCKUedDmxTLNL9cpFUhG2ku8ThNn7t/wfKWI0= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 h1:1tIEJSN3HeCY602B5h2b1K6ocNn/HMNC2E+u7o3ceZA= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0/go.mod h1:r8oKp+HrgZDp4L6RiNYoEk3x+LMrt9lEiCW6WiaYuJM= +go.opentelemetry.io/collector/processor/processortest v0.116.0 h1:+IqNEVEE0E2MsO2g7+Y/9dz35sDuvAXRXrLts9NdXrA= +go.opentelemetry.io/collector/processor/processortest v0.116.0/go.mod h1:DLaQDBxzgeeaUO0ULMn/efos9PmHZkmYCHuxwCsiVHI= +go.opentelemetry.io/collector/processor/xprocessor v0.116.0 h1:iin/UwuWvSLB7ZNfINFUYbZ5lxIi1NjZ2brkyyFdiRA= +go.opentelemetry.io/collector/processor/xprocessor v0.116.0/go.mod h1:cnA43/XpKDbaOmd8buqKp/LGJ2l/OoCqbR//u5DMfn8= +go.opentelemetry.io/collector/receiver v0.116.0 h1:voiBluWLwe4lbyLVwxloK6CudqqszWF+bgYKHuxnETU= +go.opentelemetry.io/collector/receiver v0.116.0/go.mod h1:zb6m8l+knUuN62ASCDqQPIm9punK8PEX1mFrF/yzMI8= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.116.0 h1:81u+wJsQp9VfrAdVpVvcV31YAs8qsZp/UnMmG9YCJ0A= +go.opentelemetry.io/collector/receiver/otlpreceiver v0.116.0/go.mod h1:JXIwjUyh3Q+gNvr7YE937se4/E4UJ/oz5z9xbJeVl3M= +go.opentelemetry.io/collector/receiver/receivertest v0.116.0 h1:ZF4QVcots0OUiutblkyPR02pc+g7v1QaJSFW8tOzHoQ= +go.opentelemetry.io/collector/receiver/receivertest v0.116.0/go.mod h1:7GGvtHhW3o6457/wGtSWXJtCtlW6VGFUZSlf6wboNTw= +go.opentelemetry.io/collector/receiver/xreceiver v0.116.0 h1:Kc+ixqgMjU2sHhzNrFn5TttVNiJlJwTLL3sQrM9uH6s= +go.opentelemetry.io/collector/receiver/xreceiver v0.116.0/go.mod h1:H2YGSNFoMbWMIDvB8tzkReHSVqvogihjtet+ppHfYv8= +go.opentelemetry.io/collector/semconv v0.116.0 h1:63xCZomsKJAWmKGWD3lnORiE3WKW6AO4LjnzcHzGx3Y= +go.opentelemetry.io/collector/semconv v0.116.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI= +go.opentelemetry.io/collector/service v0.116.0 h1:1rFmax3ILOlQq4bW//0VKRcG/HmN2rxrgfTybn6bisU= +go.opentelemetry.io/collector/service v0.116.0/go.mod h1:CzQzj72mWr5arag+q8uUWGRuUkenNo5Gw9oA97SFZ78= go.opentelemetry.io/contrib/bridges/otelzap v0.6.0 h1:j8icMXyyqNf6HGuwlYhniPnVsbJIq7n+WirDu3VAJdQ= go.opentelemetry.io/contrib/bridges/otelzap v0.6.0/go.mod h1:evIOZpl+kAlU5IsaYX2Siw+IbpacAZvXemVsgt70uvw= go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= @@ -903,44 +912,44 @@ go.opentelemetry.io/contrib/propagators/b3 v1.31.0 h1:PQPXYscmwbCp76QDvO4hMngF2j go.opentelemetry.io/contrib/propagators/b3 v1.31.0/go.mod h1:jbqfV8wDdqSDrAYxVpXQnpM0XFMq2FtDesblJ7blOwQ= go.opentelemetry.io/contrib/zpages v0.56.0 h1:W7vP6s3juzL5KiHpr41zLNmsJ0QAZudYu8ay0zGAoko= go.opentelemetry.io/contrib/zpages v0.56.0/go.mod h1:IxPRP4TYHw9jLeaEOSDIiA9zmyJNZNO6sbW55iMvSXs= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.7.0 h1:iNba3cIZTDPB2+IAbVY/3TUN+pCCLrNYo2GaGtsKBak= -go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.7.0/go.mod h1:l5BDPiZ9FbeejzWTAX6BowMzQOM/GeaUQ6lr3sOcSkc= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 h1:WzNab7hOOLzdDF/EoWCt4glhrbMPVMOO5JYTmpz36Ls= +go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0/go.mod h1:hKvJwTzJdp90Vh7p6q/9PAOd55dI6WA6sWj62a/JvSs= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0 h1:mMOmtYie9Fx6TSVzw4W+NTpvoaS1JWWga37oI1a/4qQ= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.7.0/go.mod h1:yy7nDsMMBUkD+jeekJ36ur5f3jJIrmCwUrY67VFhNpA= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0 h1:FZ6ei8GFW7kyPYdxJaV2rgI6M+4tvZzhYsQ2wgyVC08= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.31.0/go.mod h1:MdEu/mC6j3D+tTEfvI15b5Ci2Fn7NneJ71YMoiS3tpI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0 h1:ZsXq73BERAiNuuFXYqP4MR5hBrjXfMGSO+Cx7qoOZiM= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0/go.mod h1:hg1zaDMpyZJuUzjFxFsRYBoccE86tM9Uf4IqNMUxvrY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7ZSD+5yn+lo3sGV69nW04rRR0jhYnBwjuX3r0HvnK0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= -go.opentelemetry.io/otel/exporters/prometheus v0.53.0 h1:QXobPHrwiGLM4ufrY3EOmDPJpo2P90UuFau4CDPJA/I= -go.opentelemetry.io/otel/exporters/prometheus v0.53.0/go.mod h1:WOAXGr3D00CfzmFxtTV1eR0GpoHuPEu+HJT8UWW2SIU= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= +go.opentelemetry.io/otel/exporters/prometheus v0.54.0/go.mod h1:QyjcV9qDP6VeK5qPyKETvNjmaaEc7+gqjh4SS0ZYzDU= go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0 h1:TwmL3O3fRR80m8EshBrd8YydEZMcUCsZXzOUlnFohwM= go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.7.0/go.mod h1:tH98dDv5KPmPThswbXA0fr0Lwfs+OhK8HgaCo7PjRrk= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.31.0 h1:HZgBIps9wH0RDrwjrmNa3DVbNRW60HEhdzqZFyAp3fI= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.31.0/go.mod h1:RDRhvt6TDG0eIXmonAx5bd9IcwpqCkziwkOClzWKwAQ= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0 h1:SZmDnHcgp3zwlPBS2JX2urGYe/jBKEIT6ZedHRUyCz8= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.32.0/go.mod h1:fdWW0HtZJ7+jNpTKUR0GpMEDP69nR8YBJQxNiVCE3jk= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= -go.opentelemetry.io/otel/log v0.7.0 h1:d1abJc0b1QQZADKvfe9JqqrfmPYQCz2tUSO+0XZmuV4= -go.opentelemetry.io/otel/log v0.7.0/go.mod h1:2jf2z7uVfnzDNknKTO9G+ahcOAyWcp1fJmk/wJjULRo= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/log v0.7.0 h1:dXkeI2S0MLc5g0/AwxTZv6EUEjctiH8aG14Am56NTmQ= -go.opentelemetry.io/otel/sdk/log v0.7.0/go.mod h1:oIRXpW+WD6M8BuGj5rtS0aRu/86cbDV/dAfNaZBIjYM= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= +go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/log v0.8.0 h1:zg7GUYXqxk1jnGF/dTdLPrK06xJdrXgqgFLnI4Crxvs= +go.opentelemetry.io/otel/sdk/log v0.8.0/go.mod h1:50iXr0UVwQrYS45KbruFrEt4LvAdCaWWgIrsN3ZQggo= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -1054,8 +1063,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1277,10 +1286,10 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= -google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1294,8 +1303,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1307,8 +1316,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1346,14 +1355,14 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/src/internal/coreinternal/go.mod b/src/internal/coreinternal/go.mod index 380f8a8f..15c19a8d 100644 --- a/src/internal/coreinternal/go.mod +++ b/src/internal/coreinternal/go.mod @@ -2,4 +2,4 @@ module github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreintern go 1.23.0 -require go.opentelemetry.io/collector/client v1.19.0 +require go.opentelemetry.io/collector/client v1.22.0 diff --git a/src/internal/coreinternal/go.sum b/src/internal/coreinternal/go.sum index 1dadcf3e..703b1b00 100644 --- a/src/internal/coreinternal/go.sum +++ b/src/internal/coreinternal/go.sum @@ -10,29 +10,29 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opentelemetry.io/collector/client v1.19.0 h1:TUal8WV1agTrZStgE7BJ8ZC0IHLGtrfgO9ogU9t1mv8= -go.opentelemetry.io/collector/client v1.19.0/go.mod h1:jgiXMEM6l8L2QEyf2I/M47Zd8+G7e4z+6H8q5SkHOlQ= -go.opentelemetry.io/collector/consumer v0.113.0 h1:KJSiK5vSIY9dgPxwKfQ3gOgKtQsqc+7IB7mGhUAL5c8= -go.opentelemetry.io/collector/consumer v0.113.0/go.mod h1:zHMlXYFaJlZoLCBR6UwWoyXZ/adcO1u2ydqUal3VmYU= -go.opentelemetry.io/collector/pdata v1.19.0 h1:jmnU5R8TOCbwRr4B8sjdRxM7L5WnEKlQWX1dtLYxIbE= -go.opentelemetry.io/collector/pdata v1.19.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/collector/client v1.22.0 h1:AAUzHuqYQqxoNqacw1WXgGF/MxtBTwNZuhBvJIorgA0= +go.opentelemetry.io/collector/client v1.22.0/go.mod h1:wcCSdTwbDVNTycoqs7BiDNVj3e1Ta7EnWH2sAofKnEk= +go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= +go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= +go.opentelemetry.io/collector/pdata v1.22.0 h1:3yhjL46NLdTMoP8rkkcE9B0pzjf2973crn0KKhX5UrI= +go.opentelemetry.io/collector/pdata v1.22.0/go.mod h1:nLLf6uDg8Kn5g3WNZwGyu8+kf77SwOqQvMTb5AXEbEY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= -golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/src/internal/k8sconfig/config.go b/src/internal/k8sconfig/config.go index 3447ae2d..8a891d0f 100644 --- a/src/internal/k8sconfig/config.go +++ b/src/internal/k8sconfig/config.go @@ -114,7 +114,6 @@ func CreateRestConfig(apiConf APIConfig) (*rest.Config, error) { } authConf, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( loadingRules, configOverrides).ClientConfig() - if err != nil { return nil, fmt.Errorf("error connecting to k8s with auth_type=%s: %w", AuthTypeKubeConfig, err) } diff --git a/src/internal/k8sconfig/go.mod b/src/internal/k8sconfig/go.mod index 39d7ceea..8795abfe 100644 --- a/src/internal/k8sconfig/go.mod +++ b/src/internal/k8sconfig/go.mod @@ -4,9 +4,9 @@ go 1.23.0 require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/src/internal/k8sconfig/go.sum b/src/internal/k8sconfig/go.sum index 427672a9..a444673c 100644 --- a/src/internal/k8sconfig/go.sum +++ b/src/internal/k8sconfig/go.sum @@ -483,14 +483,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/src/processor/k8sattributesprocessor/client_test.go b/src/processor/k8sattributesprocessor/client_test.go index 614bd130..bd3dc776 100644 --- a/src/processor/k8sattributesprocessor/client_test.go +++ b/src/processor/k8sattributesprocessor/client_test.go @@ -18,6 +18,8 @@ package swk8sattributesprocessor import ( + "time" + "go.opentelemetry.io/collector/component" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" @@ -58,6 +60,8 @@ func newFakeClient( _ kube.APIClientsetProvider, _ kube.InformerProvider, _ kube.InformerProviderNamespace, + _ bool, + _ time.Duration, _ map[string]*kube.ClientResource) (kube.Client, error) { cs := fake.NewSimpleClientset() @@ -65,13 +69,16 @@ func newFakeClient( return &fakeClient{ Pods: map[kube.PodIdentifier]*kube.Pod{}, Resources: map[string]map[kube.ResourceIdentifier]kube.KubernetesResource{ - kube.MetadataFromDeployment: {}, - kube.MetadataFromStatefulSet: {}, - kube.MetadataFromReplicaSet: {}, - kube.MetadataFromDaemonSet: {}, - kube.MetadataFromJob: {}, - kube.MetadataFromCronJob: {}, - kube.MetadataFromNode: {}, + kube.MetadataFromDeployment: {}, + kube.MetadataFromStatefulSet: {}, + kube.MetadataFromReplicaSet: {}, + kube.MetadataFromDaemonSet: {}, + kube.MetadataFromJob: {}, + kube.MetadataFromCronJob: {}, + kube.MetadataFromNode: {}, + kube.MetadataFromPersistentVolume: {}, + kube.MetadataFromPersistentVolumeClaim: {}, + kube.MetadataFromService: {}, }, Rules: rules, Filters: filters, @@ -95,10 +102,11 @@ func (f *fakeClient) GetNamespace(namespace string) (*kube.Namespace, bool) { } // Start is a noop for FakeClient. -func (f *fakeClient) Start() { +func (f *fakeClient) Start() error { if f.Informer != nil { - f.Informer.Run(f.StopCh) + go f.Informer.Run(f.StopCh) } + return nil } // Stop is a noop for FakeClient. diff --git a/src/processor/k8sattributesprocessor/config.go b/src/processor/k8sattributesprocessor/config.go index 328a8bf0..b45629fa 100644 --- a/src/processor/k8sattributesprocessor/config.go +++ b/src/processor/k8sattributesprocessor/config.go @@ -20,6 +20,7 @@ package swk8sattributesprocessor // import "github.com/solarwinds/swi-k8s-opente import ( "fmt" "regexp" + "time" "github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig" "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor/internal/kube" @@ -30,7 +31,7 @@ import ( var disallowFieldExtractConfigRegex = featuregate.GlobalRegistry().MustRegister( "k8sattr.fieldExtractConfigRegex.disallow", - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, usage of the FieldExtractConfig.Regex field is disallowed"), featuregate.WithRegisterFromVersion("v0.106.0"), ) @@ -65,6 +66,12 @@ type Config struct { // ignored while tagging. Exclude ExcludeConfig `mapstructure:"exclude"` + // WaitForMetadata is a flag that determines if the processor should wait k8s metadata to be synced when starting. + WaitForMetadata bool `mapstructure:"wait_for_metadata"` + + // WaitForMetadataTimeout is the maximum time the processor will wait for the k8s metadata to be synced. + WaitForMetadataTimeout time.Duration `mapstructure:"wait_for_metadata_timeout"` + // Section allows to define rules for extracting annotations and labels from Deployment Deployment DeploymentConfig `mapstructure:"deployment"` diff --git a/src/processor/k8sattributesprocessor/config_test.go b/src/processor/k8sattributesprocessor/config_test.go index f8b996a6..9de72b08 100644 --- a/src/processor/k8sattributesprocessor/config_test.go +++ b/src/processor/k8sattributesprocessor/config_test.go @@ -20,6 +20,7 @@ package swk8sattributesprocessor import ( "path/filepath" "testing" + "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -48,6 +49,7 @@ func TestLoadConfig(t *testing.T) { Extract: ExtractConfig{ Metadata: enabledAttributes(), }, + WaitForMetadataTimeout: 10 * time.Second, }, }, { @@ -363,7 +365,9 @@ func TestLoadConfig(t *testing.T) { {Name: "jaeger-collector"}, }, }, + WaitForMetadataTimeout: 10 * time.Second, }, + disallowRegex: false, }, { id: component.NewIDWithName(metadata.Type, "3"), @@ -385,6 +389,7 @@ func TestLoadConfig(t *testing.T) { {Name: "jaeger-collector"}, }, }, + WaitForMetadataTimeout: 10 * time.Second, }, }, { @@ -407,7 +412,9 @@ func TestLoadConfig(t *testing.T) { {Name: "jaeger-collector"}, }, }, + WaitForMetadataTimeout: 10 * time.Second, }, + disallowRegex: false, }, { id: component.NewIDWithName(metadata.Type, "too_many_sources"), @@ -462,10 +469,10 @@ func TestLoadConfig(t *testing.T) { for _, tt := range tests { t.Run(tt.id.String(), func(t *testing.T) { - if tt.disallowRegex { - require.Nil(t, featuregate.GlobalRegistry().Set(disallowFieldExtractConfigRegex.ID(), true)) + if !tt.disallowRegex { + require.NoError(t, featuregate.GlobalRegistry().Set(disallowFieldExtractConfigRegex.ID(), false)) t.Cleanup(func() { - require.Nil(t, featuregate.GlobalRegistry().Set(disallowFieldExtractConfigRegex.ID(), false)) + require.NoError(t, featuregate.GlobalRegistry().Set(disallowFieldExtractConfigRegex.ID(), true)) }) } cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) diff --git a/src/processor/k8sattributesprocessor/factory.go b/src/processor/k8sattributesprocessor/factory.go index 96160ee7..072e1784 100644 --- a/src/processor/k8sattributesprocessor/factory.go +++ b/src/processor/k8sattributesprocessor/factory.go @@ -19,29 +19,36 @@ package swk8sattributesprocessor // import "github.com/solarwinds/swi-k8s-opente import ( "context" + "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/xconsumer" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" + "go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper" + "go.opentelemetry.io/collector/processor/xprocessor" "github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig" "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor/internal/kube" "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor/internal/metadata" ) -var kubeClientProvider = kube.ClientProvider(nil) -var consumerCapabilities = consumer.Capabilities{MutatesData: true} -var defaultExcludes = ExcludeConfig{Pods: []ExcludePodConfig{{Name: "jaeger-agent"}, {Name: "jaeger-collector"}}} +var ( + kubeClientProvider = kube.ClientProvider(nil) + consumerCapabilities = consumer.Capabilities{MutatesData: true} + defaultExcludes = ExcludeConfig{Pods: []ExcludePodConfig{{Name: "jaeger-agent"}, {Name: "jaeger-collector"}}} +) // NewFactory returns a new factory for the k8s processor. func NewFactory() processor.Factory { - return processor.NewFactory( + return xprocessor.NewFactory( metadata.Type, createDefaultConfig, - processor.WithTraces(createTracesProcessor, metadata.TracesStability), - processor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), - processor.WithLogs(createLogsProcessor, metadata.LogsStability), + xprocessor.WithTraces(createTracesProcessor, metadata.TracesStability), + xprocessor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), + xprocessor.WithLogs(createLogsProcessor, metadata.LogsStability), + xprocessor.WithProfiles(createProfilesProcessor, metadata.ProfilesStability), ) } @@ -52,6 +59,7 @@ func createDefaultConfig() component.Config { Extract: ExtractConfig{ Metadata: enabledAttributes(), }, + WaitForMetadataTimeout: 10 * time.Second, } } @@ -82,6 +90,15 @@ func createMetricsProcessor( return createMetricsProcessorWithOptions(ctx, params, cfg, nextMetricsConsumer) } +func createProfilesProcessor( + ctx context.Context, + params processor.Settings, + cfg component.Config, + nextProfilesConsumer xconsumer.Profiles, +) (xprocessor.Profiles, error) { + return createProfilesProcessorWithOptions(ctx, params, cfg, nextProfilesConsumer) +} + func createTracesProcessorWithOptions( ctx context.Context, set processor.Settings, @@ -142,6 +159,27 @@ func createLogsProcessorWithOptions( processorhelper.WithShutdown(kp.Shutdown)) } +func createProfilesProcessorWithOptions( + ctx context.Context, + set processor.Settings, + cfg component.Config, + nextProfilesConsumer xconsumer.Profiles, + options ...option, +) (xprocessor.Profiles, error) { + kp := createKubernetesProcessor(set, cfg, options...) + + return xprocessorhelper.NewProfiles( + ctx, + set, + cfg, + nextProfilesConsumer, + kp.processProfiles, + xprocessorhelper.WithCapabilities(consumerCapabilities), + xprocessorhelper.WithStart(kp.Start), + xprocessorhelper.WithShutdown(kp.Shutdown), + ) +} + func createKubernetesProcessor( params processor.Settings, cfg component.Config, @@ -182,8 +220,14 @@ func createProcessorOpts(cfg component.Config) []option { opts = append(opts, withAPIConfig(oCfg.APIConfig)) opts = append(opts, withExtractPodAssociations(oCfg.Association...)) + opts = append(opts, withExcludes(oCfg.Exclude)) + opts = append(opts, withWaitForMetadataTimeout(oCfg.WaitForMetadataTimeout)) + if oCfg.WaitForMetadata { + opts = append(opts, withWaitForMetadata(true)) + } + opts = append(opts, createDeploymentProcessorOpts(oCfg.Deployment)...) opts = append(opts, createStatefulSetProcessorOpts(oCfg.StatefulSet)...) opts = append(opts, createReplicaSetProcessorOpts(oCfg.ReplicaSet)...) diff --git a/src/processor/k8sattributesprocessor/factory_test.go b/src/processor/k8sattributesprocessor/factory_test.go index 82d92dff..90c7ea44 100644 --- a/src/processor/k8sattributesprocessor/factory_test.go +++ b/src/processor/k8sattributesprocessor/factory_test.go @@ -25,6 +25,7 @@ import ( "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/processor/xprocessor" ) func TestCreateDefaultConfig(t *testing.T) { @@ -55,6 +56,10 @@ func TestCreateProcessor(t *testing.T) { assert.NotNil(t, lp) assert.NoError(t, err) + pp, err := factory.(xprocessor.Factory).CreateProfiles(context.Background(), params, cfg, consumertest.NewNop()) + assert.NotNil(t, pp) + assert.NoError(t, err) + oCfg := cfg.(*Config) oCfg.Passthrough = true @@ -70,6 +75,10 @@ func TestCreateProcessor(t *testing.T) { assert.NotNil(t, lp) assert.NoError(t, err) + pp, err = factory.(xprocessor.Factory).CreateProfiles(context.Background(), params, cfg, consumertest.NewNop()) + assert.NotNil(t, pp) + assert.NoError(t, err) + // Switch it back so other tests run afterwards will not fail on unexpected state kubeClientProvider = realClient } diff --git a/src/processor/k8sattributesprocessor/generated_component_telemetry_test.go b/src/processor/k8sattributesprocessor/generated_component_telemetry_test.go index b2eb5088..61ab0a2a 100644 --- a/src/processor/k8sattributesprocessor/generated_component_telemetry_test.go +++ b/src/processor/k8sattributesprocessor/generated_component_telemetry_test.go @@ -12,6 +12,8 @@ import ( "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" ) @@ -22,11 +24,17 @@ type componentTestTelemetry struct { } func (tt *componentTestTelemetry) NewSettings() processor.Settings { - settings := processortest.NewNopSettings() - settings.MeterProvider = tt.meterProvider - settings.ID = component.NewID(component.MustNewType("swk8sattributes")) + set := processortest.NewNopSettings() + set.ID = component.NewID(component.MustNewType("swk8sattributes")) + set.TelemetrySettings = tt.newTelemetrySettings() + return set +} - return settings +func (tt *componentTestTelemetry) newTelemetrySettings() component.TelemetrySettings { + set := componenttest.NewNopTelemetrySettings() + set.MeterProvider = tt.meterProvider + set.MetricsLevel = configtelemetry.LevelDetailed + return set } func setupTestTelemetry() componentTestTelemetry { diff --git a/src/processor/k8sattributesprocessor/go.mod b/src/processor/k8sattributesprocessor/go.mod index 42ef8db7..03bd9cfd 100644 --- a/src/processor/k8sattributesprocessor/go.mod +++ b/src/processor/k8sattributesprocessor/go.mod @@ -5,29 +5,34 @@ go 1.23.0 require ( github.com/distribution/reference v0.6.0 github.com/google/go-cmp v0.6.0 - github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.113.0 - github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.113.0 - github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/client v1.19.0 - go.opentelemetry.io/collector/component v0.113.0 - go.opentelemetry.io/collector/component/componentstatus v0.113.0 - go.opentelemetry.io/collector/config/configtelemetry v0.113.0 - go.opentelemetry.io/collector/confmap v1.19.0 - go.opentelemetry.io/collector/consumer v0.113.0 - go.opentelemetry.io/collector/consumer/consumertest v0.113.0 + github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.116.0 + github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.116.0 + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/client v1.22.0 + go.opentelemetry.io/collector/component v0.116.0 + go.opentelemetry.io/collector/component/componentstatus v0.116.0 + go.opentelemetry.io/collector/component/componenttest v0.116.0 + go.opentelemetry.io/collector/config/configtelemetry v0.116.0 + go.opentelemetry.io/collector/confmap v1.22.0 + go.opentelemetry.io/collector/consumer v1.22.0 + go.opentelemetry.io/collector/consumer/consumertest v0.116.0 + go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 go.opentelemetry.io/collector/featuregate v1.19.0 - go.opentelemetry.io/collector/pdata v1.19.0 - go.opentelemetry.io/collector/processor v0.113.0 - go.opentelemetry.io/collector/processor/processortest v0.113.0 - go.opentelemetry.io/collector/semconv v0.113.0 - go.opentelemetry.io/otel/metric v1.31.0 - go.opentelemetry.io/otel/sdk/metric v1.31.0 - go.opentelemetry.io/otel/trace v1.31.0 + go.opentelemetry.io/collector/pdata v1.22.0 + go.opentelemetry.io/collector/pdata/pprofile v0.116.0 + go.opentelemetry.io/collector/processor v0.116.0 + go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 + go.opentelemetry.io/collector/processor/processortest v0.116.0 + go.opentelemetry.io/collector/processor/xprocessor v0.116.0 + go.opentelemetry.io/collector/semconv v0.116.0 + go.opentelemetry.io/otel/metric v1.32.0 + go.opentelemetry.io/otel/sdk/metric v1.32.0 + go.opentelemetry.io/otel/trace v1.32.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( @@ -51,7 +56,7 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/knadh/koanf/v2 v2.1.2 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -65,23 +70,20 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.113.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.113.0 // indirect - go.opentelemetry.io/collector/pipeline v0.113.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect - go.opentelemetry.io/otel/sdk v1.31.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect + go.opentelemetry.io/collector/pipeline v0.116.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.33.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.4.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect - google.golang.org/grpc v1.67.1 // indirect - google.golang.org/protobuf v1.35.1 // indirect + google.golang.org/grpc v1.68.1 // indirect + google.golang.org/protobuf v1.35.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -100,6 +102,6 @@ replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api // ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules replace cloud.google.com/go v0.54.0 => cloud.google.com/go v0.110.10 -replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.113.0 => ../../internal/k8sconfig +replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.116.0 => ../../internal/k8sconfig -replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.113.0 => ../../internal/coreinternal +replace github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/coreinternal v0.116.0 => ../../internal/coreinternal diff --git a/src/processor/k8sattributesprocessor/go.sum b/src/processor/k8sattributesprocessor/go.sum index 23c843ee..25d146b5 100644 --- a/src/processor/k8sattributesprocessor/go.sum +++ b/src/processor/k8sattributesprocessor/go.sum @@ -1049,8 +1049,8 @@ github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NI github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= -github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/knadh/koanf/v2 v2.1.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -1166,8 +1166,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1187,50 +1187,54 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector/client v1.19.0 h1:TUal8WV1agTrZStgE7BJ8ZC0IHLGtrfgO9ogU9t1mv8= -go.opentelemetry.io/collector/client v1.19.0/go.mod h1:jgiXMEM6l8L2QEyf2I/M47Zd8+G7e4z+6H8q5SkHOlQ= -go.opentelemetry.io/collector/component v0.113.0 h1:/nx+RvZgxUEXP+YcTj69rEtuSEGkfaCyp/ad5zQGLjU= -go.opentelemetry.io/collector/component v0.113.0/go.mod h1:2T779hIGHU9i7xbXbV3q1/JnRw2FyzUYXW2vq47A6EU= -go.opentelemetry.io/collector/component/componentstatus v0.113.0 h1:iNlUi+vDo7OqQwg4UOjfqqY3Xram4SkdcSZAyxt6QfE= -go.opentelemetry.io/collector/component/componentstatus v0.113.0/go.mod h1:NF/hVnP0kcsEqV9x14yMxN9GoehuOaVgMpO+s2KE+28= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0 h1:hweTRrVddnUeA3k7HzRY4oUR9lRdMa7of3mHNUS5YyA= -go.opentelemetry.io/collector/config/configtelemetry v0.113.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= -go.opentelemetry.io/collector/confmap v1.19.0 h1:TQ0lZpAKqgsE0EKk+u4JA+uBbPYeFRmWP3GH43w40CY= -go.opentelemetry.io/collector/confmap v1.19.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= -go.opentelemetry.io/collector/consumer v0.113.0 h1:KJSiK5vSIY9dgPxwKfQ3gOgKtQsqc+7IB7mGhUAL5c8= -go.opentelemetry.io/collector/consumer v0.113.0/go.mod h1:zHMlXYFaJlZoLCBR6UwWoyXZ/adcO1u2ydqUal3VmYU= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 h1:RftAcQUY5UOfbEK4s16jnORqTx16y9+PxA1lQwt98cQ= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0/go.mod h1:ZuHrQ4pWguh6dw0DgTfcUtdY/T+cnOJJNP6LMbm5Y5A= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0 h1:ua2AjNx3DUA8qElXNkggB4w3VDL/rBKBvryOQkhumH8= -go.opentelemetry.io/collector/consumer/consumertest v0.113.0/go.mod h1:vK8o4ZTZSiG3rVyqxZcCNmT/cvEfx34ig7V65L9+6Rg= +go.opentelemetry.io/collector/client v1.22.0 h1:AAUzHuqYQqxoNqacw1WXgGF/MxtBTwNZuhBvJIorgA0= +go.opentelemetry.io/collector/client v1.22.0/go.mod h1:wcCSdTwbDVNTycoqs7BiDNVj3e1Ta7EnWH2sAofKnEk= +go.opentelemetry.io/collector/component v0.116.0 h1:SQE1YeVfYCN7bw1n4hknUwJE5U/1qJL552sDhAdSlaA= +go.opentelemetry.io/collector/component v0.116.0/go.mod h1:MYgXFZWDTq0uPgF1mkLSFibtpNqksRVAOrmihckOQEs= +go.opentelemetry.io/collector/component/componentstatus v0.116.0 h1:wpgY0H2K9IPBzaNAvavKziK86VZ7TuNFQbS9OC4Z6Cs= +go.opentelemetry.io/collector/component/componentstatus v0.116.0/go.mod h1:ZRlVwHFMGNfcsAywEJqivOn5JzDZkpe3KZVSwMWu4tw= +go.opentelemetry.io/collector/component/componenttest v0.116.0 h1:UIcnx4Rrs/oDRYSAZNHRMUiYs2FBlwgV5Nc0oMYfR6A= +go.opentelemetry.io/collector/component/componenttest v0.116.0/go.mod h1:W40HaKPHdBFMVI7zzHE7dhdWC+CgAnAC9SmWetFBATY= +go.opentelemetry.io/collector/config/configtelemetry v0.116.0 h1:Vl49VCHQwBOeMswDpFwcl2HD8e9y94xlrfII3SR2VeQ= +go.opentelemetry.io/collector/config/configtelemetry v0.116.0/go.mod h1:SlBEwQg0qly75rXZ6W1Ig8jN25KBVBkFIIAUI1GiAAE= +go.opentelemetry.io/collector/confmap v1.22.0 h1:ZKQzRuj5lKu+seKArAAZ1yPRroDPricaIVIREm/jr3w= +go.opentelemetry.io/collector/confmap v1.22.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= +go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= +go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= +go.opentelemetry.io/collector/consumer/consumertest v0.116.0 h1:pIVR7FtQMNAzfxBUSMEIC2dX5Lfo3O9ZBfx+sAwrrrM= +go.opentelemetry.io/collector/consumer/consumertest v0.116.0/go.mod h1:cV3cNDiPnls5JdhnOJJFVlclrClg9kPs04cXgYP9Gmk= +go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 h1:ZrWvq7HumB0jRYmS2ztZ3hhXRNpUVBWPKMbPhsVGmZM= +go.opentelemetry.io/collector/consumer/xconsumer v0.116.0/go.mod h1:C+VFMk8vLzPun6XK8aMts6h4RaDjmzXHCPaiOxzRQzQ= go.opentelemetry.io/collector/featuregate v1.19.0 h1:ASea2sU+tdpKI3RxIJC/pufDAfwAmrvcQ4EmTHVu0B0= go.opentelemetry.io/collector/featuregate v1.19.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= -go.opentelemetry.io/collector/pdata v1.19.0 h1:jmnU5R8TOCbwRr4B8sjdRxM7L5WnEKlQWX1dtLYxIbE= -go.opentelemetry.io/collector/pdata v1.19.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= -go.opentelemetry.io/collector/pdata/pprofile v0.113.0 h1:VRf4p0VhfuaR+Epy/nMIlu/9t39WU9CUgHVUvpuGxfU= -go.opentelemetry.io/collector/pdata/pprofile v0.113.0/go.mod h1:5aDejksdXh5PdJN/OhpzATGT3kbNL0RMmw2Q0Q6E/o0= -go.opentelemetry.io/collector/pdata/testdata v0.113.0 h1:vRfn85jicO2F4eOTgsWtzmU/K3E/uZUtM1HEefvvJD8= -go.opentelemetry.io/collector/pdata/testdata v0.113.0/go.mod h1:sR+6eR+YEJhYZu9StbqzeWcCmHpfBAgX/qjP82HY9Gw= -go.opentelemetry.io/collector/pipeline v0.113.0 h1:vSRzRe3717jV0btCNPhVkhg2lu0uFxcm2VO+vhad/eE= -go.opentelemetry.io/collector/pipeline v0.113.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= -go.opentelemetry.io/collector/processor v0.113.0 h1:BQI6MsKtiCG9HT/nmiRXTKP6SZFrjFKVfM6pTQfbc0k= -go.opentelemetry.io/collector/processor v0.113.0/go.mod h1:oX91zMI8ZkoaYSUfUYflHiMiiBJPKtODNBUCrETLLd8= -go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 h1:cczN6whdrCWww3T0FBV3U7lsVKQmkWDX05M+9lANHgk= -go.opentelemetry.io/collector/processor/processorprofiles v0.113.0/go.mod h1:4Dmx5qsvujgJ+MC+KqWI7UDVM2liXa3sH/9XnGiL9aE= -go.opentelemetry.io/collector/processor/processortest v0.113.0 h1:jGoDJ+tDCzuDcAWZeshQtnK/DQAvMKd4wZAIDgAM5aA= -go.opentelemetry.io/collector/processor/processortest v0.113.0/go.mod h1:tNg04r5KlpVx774jSC8U/oYst1eb7WIiz+0AjXKJ0Uw= -go.opentelemetry.io/collector/semconv v0.113.0 h1:twenSI7M7MJMJKW8D6a/GXxPZTPbama/weywBtV2iFw= -go.opentelemetry.io/collector/semconv v0.113.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/collector/pdata v1.22.0 h1:3yhjL46NLdTMoP8rkkcE9B0pzjf2973crn0KKhX5UrI= +go.opentelemetry.io/collector/pdata v1.22.0/go.mod h1:nLLf6uDg8Kn5g3WNZwGyu8+kf77SwOqQvMTb5AXEbEY= +go.opentelemetry.io/collector/pdata/pprofile v0.116.0 h1:iE6lqkO7Hi6lTIIml1RI7yQ55CKqW12R2qHinwF5Zuk= +go.opentelemetry.io/collector/pdata/pprofile v0.116.0/go.mod h1:xQiPpjzIiXRFb+1fPxUy/3ygEZgo0Bu/xmLKOWu8vMQ= +go.opentelemetry.io/collector/pdata/testdata v0.116.0 h1:zmn1zpeX2BvzL6vt2dBF4OuAyFF2ml/OXcqflNgFiP0= +go.opentelemetry.io/collector/pdata/testdata v0.116.0/go.mod h1:ytWzICFN4XTDP6o65B4+Ed52JGdqgk9B8CpLHCeCpMo= +go.opentelemetry.io/collector/pipeline v0.116.0 h1:o8eKEuWEszmRpfShy7ElBoQ3Jo6kCi9ucm3yRgdNb9s= +go.opentelemetry.io/collector/pipeline v0.116.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= +go.opentelemetry.io/collector/processor v0.116.0 h1:Kyu4tPzTdWNHtZjcxvI/bGNAgyv8L8Kem2r/Mk4IDAw= +go.opentelemetry.io/collector/processor v0.116.0/go.mod h1:+/Ugy48RAxlZEXmN2cw51W8t5wdHS9No+GAoP+moskk= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 h1:1tIEJSN3HeCY602B5h2b1K6ocNn/HMNC2E+u7o3ceZA= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0/go.mod h1:r8oKp+HrgZDp4L6RiNYoEk3x+LMrt9lEiCW6WiaYuJM= +go.opentelemetry.io/collector/processor/processortest v0.116.0 h1:+IqNEVEE0E2MsO2g7+Y/9dz35sDuvAXRXrLts9NdXrA= +go.opentelemetry.io/collector/processor/processortest v0.116.0/go.mod h1:DLaQDBxzgeeaUO0ULMn/efos9PmHZkmYCHuxwCsiVHI= +go.opentelemetry.io/collector/processor/xprocessor v0.116.0 h1:iin/UwuWvSLB7ZNfINFUYbZ5lxIi1NjZ2brkyyFdiRA= +go.opentelemetry.io/collector/processor/xprocessor v0.116.0/go.mod h1:cnA43/XpKDbaOmd8buqKp/LGJ2l/OoCqbR//u5DMfn8= +go.opentelemetry.io/collector/semconv v0.116.0 h1:63xCZomsKJAWmKGWD3lnORiE3WKW6AO4LjnzcHzGx3Y= +go.opentelemetry.io/collector/semconv v0.116.0/go.mod h1:N6XE8Q0JKgBN2fAhkUQtqK9LT7rEGR6+Wu/Rtbal1iI= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1418,8 +1422,8 @@ golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1934,8 +1938,8 @@ google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1955,8 +1959,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1990,14 +1994,14 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/src/processor/k8sattributesprocessor/internal/kube/client.go b/src/processor/k8sattributesprocessor/internal/kube/client.go index de715f65..cad512ff 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/client.go +++ b/src/processor/k8sattributesprocessor/internal/kube/client.go @@ -19,6 +19,7 @@ package kube // import "github.com/solarwinds/swi-k8s-opentelemetry-collector/pr import ( "context" + "errors" "fmt" "regexp" "strings" @@ -53,16 +54,18 @@ var enableRFC3339Timestamp = featuregate.GlobalRegistry().MustRegister( // WatchClient is the main interface provided by this package to a kubernetes cluster. type WatchClient struct { - m sync.RWMutex - deleteMut sync.Mutex - logger *zap.Logger - kc kubernetes.Interface - informer cache.SharedInformer - namespaceInformer cache.SharedInformer - replicasetRegex *regexp.Regexp - cronJobRegex *regexp.Regexp - deleteQueue []deleteRequest - stopCh chan struct{} + m sync.RWMutex + deleteMut sync.Mutex + logger *zap.Logger + kc kubernetes.Interface + informer cache.SharedInformer + namespaceInformer cache.SharedInformer + replicasetRegex *regexp.Regexp + cronJobRegex *regexp.Regexp + deleteQueue []deleteRequest + stopCh chan struct{} + waitForMetadata bool + waitForMetadataTimeout time.Duration // A map containing Pod related data, used to associate them with resources. // Key can be either an IP address or Pod UID @@ -109,6 +112,8 @@ func New( newClientSet APIClientsetProvider, newInformer InformerProvider, newNamespaceInformer InformerProviderNamespace, + waitForMetadata bool, + waitForMetadataTimeout time.Duration, clientResources map[string]*ClientResource) (Client, error) { telemetryBuilder, err := metadata.NewTelemetryBuilder(set) if err != nil { @@ -116,15 +121,17 @@ func New( } c := &WatchClient{ - logger: set.Logger, - Rules: rules, - Filters: filters, - Associations: associations, - Exclude: exclude, - replicasetRegex: rRegex, - cronJobRegex: cronJobRegex, - stopCh: make(chan struct{}), - telemetryBuilder: telemetryBuilder, + logger: set.Logger, + Rules: rules, + Filters: filters, + Associations: associations, + Exclude: exclude, + replicasetRegex: rRegex, + cronJobRegex: cronJobRegex, + stopCh: make(chan struct{}), + telemetryBuilder: telemetryBuilder, + waitForMetadata: waitForMetadata, + waitForMetadataTimeout: waitForMetadataTimeout, } go c.deleteLoop(time.Second*30, defaultPodDeleteGracePeriod) @@ -305,66 +312,53 @@ func New( } // Start registers pod event handlers and starts watching the kubernetes cluster for pod changes. -func (c *WatchClient) Start() { - _, err := c.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ +func (c *WatchClient) Start() error { + synced := make([]cache.InformerSynced, 0) + reg, err := c.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: c.handlePodAdd, UpdateFunc: c.handlePodUpdate, DeleteFunc: c.handlePodDelete, }) if err != nil { - c.logger.Error("error adding event handler to pod informer", zap.Error(err)) + return err } + synced = append(synced, reg.HasSynced) go c.informer.Run(c.stopCh) - _, err = c.namespaceInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + reg, err = c.namespaceInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: c.handleNamespaceAdd, UpdateFunc: c.handleNamespaceUpdate, DeleteFunc: c.handleNamespaceDelete, }) if err != nil { - c.logger.Error("error adding event handler to namespace informer", zap.Error(err)) + return err } + synced = append(synced, reg.HasSynced) go c.namespaceInformer.Run(c.stopCh) - if c.DeploymentClient != nil { - c.DeploymentClient.Start() - } - - if c.StatefulSetClient != nil { - c.StatefulSetClient.Start() - } - - if c.ReplicaSetClient != nil { - c.ReplicaSetClient.Start() - } - - if c.DaemonSetClient != nil { - c.DaemonSetClient.Start() - } - - if c.JobClient != nil { - c.JobClient.Start() - } - - if c.CronJobClient != nil { - c.CronJobClient.Start() - } - - if c.NodeClient != nil { - c.NodeClient.Start() - } - - if c.PersistentVolumeClient != nil { - c.PersistentVolumeClient.Start() + clients := []*WatchResourceClient[KubernetesResource]{c.DeploymentClient, c.StatefulSetClient, c.ReplicaSetClient, c.DaemonSetClient, c.JobClient, c.CronJobClient, c.NodeClient, c.PersistentVolumeClient, c.PersistentVolumeClaimClient, c.ServiceClient} + for _, client := range clients { + if client != nil { + reg, err := client.Start() + if err != nil { + return err + } + synced = append(synced, reg.HasSynced) + } } - if c.PersistentVolumeClaimClient != nil { - c.PersistentVolumeClaimClient.Start() - } + if c.waitForMetadata { + timeoutCh := make(chan struct{}) + t := time.AfterFunc(c.waitForMetadataTimeout, func() { + close(timeoutCh) + }) + defer t.Stop() + if !cache.WaitForCacheSync(timeoutCh, synced...) { + return errors.New("failed to wait for caches to sync") + } - if c.ServiceClient != nil { - c.ServiceClient.Start() } + return nil } // Stop signals the the k8s watcher/informer to stop watching for new events. @@ -649,7 +643,6 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string { // This function removes all data from the Pod except what is required by extraction rules and pod association func removeUnnecessaryPodData(pod *api_v1.Pod, rules ExtractionRules) *api_v1.Pod { - // name, namespace, uid, start time and ip are needed for identifying Pods // there's room to optimize this further, it's kept this way for simplicity transformedPod := api_v1.Pod{ @@ -743,6 +736,30 @@ func removeUnnecessaryPodData(pod *api_v1.Pod, rules ExtractionRules) *api_v1.Po return &transformedPod } +// parseNameAndTagFromImage parses the image name and tag for differently-formatted image names. +// returns "latest" as the default if tag not present. also checks if the image contains a digest. +// if it does, no latest tag is assumed. +func parseNameAndTagFromImage(image string) (name, tag string, err error) { + ref, err := reference.Parse(image) + if err != nil { + return + } + namedRef, ok := ref.(reference.Named) + if !ok { + return "", "", errors.New("cannot retrieve image name") + } + name = namedRef.Name() + if taggedRef, ok := namedRef.(reference.Tagged); ok { + tag = taggedRef.Tag() + } + if tag == "" { + if digestedRef, ok := namedRef.(reference.Digested); !ok || digestedRef.String() == "" { + tag = "latest" + } + } + return +} + func (c *WatchClient) extractPodContainersAttributes(pod *api_v1.Pod) PodContainers { containers := PodContainers{ ByID: map[string]*Container{}, @@ -754,16 +771,14 @@ func (c *WatchClient) extractPodContainersAttributes(pod *api_v1.Pod) PodContain if c.Rules.ContainerImageName || c.Rules.ContainerImageTag { for _, spec := range append(pod.Spec.Containers, pod.Spec.InitContainers...) { container := &Container{} - nameTagSep := strings.LastIndex(spec.Image, ":") - if c.Rules.ContainerImageName { - if nameTagSep > 0 { - container.ImageName = spec.Image[:nameTagSep] - } else { - container.ImageName = spec.Image + name, tag, err := parseNameAndTagFromImage(spec.Image) + if err == nil { + if c.Rules.ContainerImageName { + container.ImageName = name + } + if c.Rules.ContainerImageTag { + container.ImageTag = tag } - } - if c.Rules.ContainerImageTag && nameTagSep > 0 { - container.ImageTag = spec.Image[nameTagSep+1:] } containers.ByName[spec.Name] = container } diff --git a/src/processor/k8sattributesprocessor/internal/kube/client_resource.go b/src/processor/k8sattributesprocessor/internal/kube/client_resource.go index e98830fe..191d54e4 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/client_resource.go +++ b/src/processor/k8sattributesprocessor/internal/kube/client_resource.go @@ -58,9 +58,9 @@ func NewWatchStatefulSetClient( conventions.AttributeK8SStatefulSetName, conventions.AttributeK8SStatefulSetUID, client.telemetryBuilder.OtelsvcK8sStatefulSetTableSize, - client.telemetryBuilder.OtelsvcK8sPodAdded, - client.telemetryBuilder.OtelsvcK8sPodUpdated, - client.telemetryBuilder.OtelsvcK8sPodDeleted, + client.telemetryBuilder.OtelsvcK8sStatefulSetAdded, + client.telemetryBuilder.OtelsvcK8sStatefulSetUpdated, + client.telemetryBuilder.OtelsvcK8sStatefulSetDeleted, newStatefulSetSharedInformer, ) } @@ -286,16 +286,16 @@ func NewWatchResourceClient[T KubernetesResource]( } // Start registers pod event handlers and starts watching the kubernetes cluster for pod changes. -func (c *WatchResourceClient[T]) Start() { - _, err := c.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ +func (c *WatchResourceClient[T]) Start() (reg cache.ResourceEventHandlerRegistration, err error) { + reg, err = c.informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: c.handleResourceAdd, UpdateFunc: c.handleResourceUpdate, DeleteFunc: c.handleResourceDelete, }) - if err != nil { - c.client.logger.Error("error adding event handler to deployment informer", zap.Error(err)) + if err == nil { + go c.informer.Run(c.client.stopCh) } - go c.informer.Run(c.client.stopCh) + return } func (c *WatchResourceClient[T]) handleResourceAdd(obj any) { diff --git a/src/processor/k8sattributesprocessor/internal/kube/client_resource_test.go b/src/processor/k8sattributesprocessor/internal/kube/client_resource_test.go index 4f01831a..acf2d674 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/client_resource_test.go +++ b/src/processor/k8sattributesprocessor/internal/kube/client_resource_test.go @@ -30,13 +30,13 @@ import ( ) func deploymentAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { - assert.Equal(t, 0, len(c.DeploymentClient.Resources)) + assert.Empty(t, c.DeploymentClient.Resources) deployment := &appsv1.Deployment{} deployment.Name = "deploymentA" deployment.UID = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" handler(deployment) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) got := c.DeploymentClient.Resources[newResourceIdentifier("resource_attribute", "k8s.deployment.uid", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")] assert.Equal(t, "deploymentA", got.GetName()) assert.Equal(t, "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", got.GetUID()) @@ -51,14 +51,14 @@ func TestDeploymentAdd(t *testing.T) { // correctly func TestDeploymentCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.DeploymentClient.Resources)) + assert.Empty(t, c.DeploymentClient.Resources) // deployment is created in Pending phase. At this point it has a UID but no start time deployment := &appsv1.Deployment{} deployment.Name = "deployment1" deployment.UID = "11111111-2222-3333-4444-555555555555" c.DeploymentClient.handleResourceAdd(deployment) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) got := c.DeploymentClient.Resources[newResourceIdentifier("resource_attribute", "k8s.deployment.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "deployment1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -66,7 +66,7 @@ func TestDeploymentCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) deployment.CreationTimestamp = startTime c.DeploymentClient.handleResourceUpdate(&appsv1.Deployment{}, deployment) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) got = c.DeploymentClient.Resources[newResourceIdentifier("resource_attribute", "k8s.deployment.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "deployment1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -111,12 +111,12 @@ func TestDeploymentDelete(t *testing.T) { t.Run(tt.name, func(t *testing.T) { c, _ := newTestClient(t) deploymentAddAndUpdateTest(t, c, c.DeploymentClient.handleResourceAdd) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) c.DeploymentClient.handleResourceDelete(tt.objToDelete) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) - assert.Equal(t, 1, len(c.DeploymentClient.deleteQueue)) + assert.Len(t, c.DeploymentClient.Resources, 1) + assert.Len(t, c.DeploymentClient.deleteQueue, 1) deleteRequest := c.DeploymentClient.deleteQueue[0] assert.Equal(t, newResourceIdentifier("resource_attribute", "k8s.deployment.uid", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), deleteRequest.id) assert.Equal(t, "deploymentA", deleteRequest.resourceName) @@ -126,7 +126,7 @@ func TestDeploymentDelete(t *testing.T) { } func TestDeploymentExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) deployment := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ @@ -285,14 +285,14 @@ func TestStatefulSetAdd(t *testing.T) { // correctly func TestStatefulSetCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.StatefulSetClient.Resources)) + assert.Empty(t, c.StatefulSetClient.Resources) // statefulset is created in Pending phase. At this point it has a UID but no start time statefulSet := &appsv1.StatefulSet{} statefulSet.Name = "statefulSet1" statefulSet.UID = "11111111-2222-3333-4444-555555555555" c.StatefulSetClient.handleResourceAdd(statefulSet) - assert.Equal(t, 1, len(c.StatefulSetClient.Resources)) + assert.Len(t, c.StatefulSetClient.Resources, 1) got := c.StatefulSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.statefulset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "statefulSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -300,7 +300,7 @@ func TestStatefulSetCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) statefulSet.CreationTimestamp = startTime c.StatefulSetClient.handleResourceUpdate(&appsv1.StatefulSet{}, statefulSet) - assert.Equal(t, 1, len(c.StatefulSetClient.Resources)) + assert.Len(t, c.StatefulSetClient.Resources, 1) got = c.StatefulSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.statefulset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "statefulSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -315,7 +315,7 @@ func TestStatefulSetUpdate(t *testing.T) { } func TestStatefulSetExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) statefulSet := &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ @@ -413,14 +413,14 @@ func TestReplicaSetAdd(t *testing.T) { func TestReplicaSetCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.ReplicaSetClient.Resources)) + assert.Empty(t, c.ReplicaSetClient.Resources) // ReplicaSet is created in Pending phase. At this point it has a UID but no start time replicaSet := &appsv1.ReplicaSet{} replicaSet.Name = "replicaSet1" replicaSet.UID = "11111111-2222-3333-4444-555555555555" c.ReplicaSetClient.handleResourceAdd(replicaSet) - assert.Equal(t, 1, len(c.ReplicaSetClient.Resources)) + assert.Len(t, c.ReplicaSetClient.Resources, 1) got := c.ReplicaSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.replicaset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "replicaSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -428,7 +428,7 @@ func TestReplicaSetCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) replicaSet.CreationTimestamp = startTime c.ReplicaSetClient.handleResourceUpdate(&appsv1.ReplicaSet{}, replicaSet) - assert.Equal(t, 1, len(c.ReplicaSetClient.Resources)) + assert.Len(t, c.ReplicaSetClient.Resources, 1) got = c.ReplicaSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.replicaset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "replicaSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -443,7 +443,7 @@ func TestReplicaSetUpdate(t *testing.T) { } func TestReplicaSetExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) replicaSet := &appsv1.ReplicaSet{ ObjectMeta: metav1.ObjectMeta{ @@ -543,14 +543,14 @@ func TestDaemonSetAdd(t *testing.T) { // correctly func TestDaemonSetCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.DaemonSetClient.Resources)) + assert.Empty(t, c.DaemonSetClient.Resources) // DaemonSet is created in Pending phase. At this point it has a UID but no start time daemonSet := &appsv1.DaemonSet{} daemonSet.Name = "daemonSet1" daemonSet.UID = "11111111-2222-3333-4444-555555555555" c.DaemonSetClient.handleResourceAdd(daemonSet) - assert.Equal(t, 1, len(c.DaemonSetClient.Resources)) + assert.Len(t, c.DaemonSetClient.Resources, 1) got := c.DaemonSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.daemonset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "daemonSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -558,7 +558,7 @@ func TestDaemonSetCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) daemonSet.CreationTimestamp = startTime c.DaemonSetClient.handleResourceUpdate(&appsv1.DaemonSet{}, daemonSet) - assert.Equal(t, 1, len(c.DaemonSetClient.Resources)) + assert.Len(t, c.DaemonSetClient.Resources, 1) got = c.DaemonSetClient.Resources[newResourceIdentifier("resource_attribute", "k8s.daemonset.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "daemonSet1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -573,7 +573,7 @@ func TestDaemonSetUpdate(t *testing.T) { } func TestDaemonSetExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) daemonSet := &appsv1.DaemonSet{ ObjectMeta: metav1.ObjectMeta{ @@ -673,14 +673,14 @@ func TestJobAdd(t *testing.T) { // correctly func TestJobCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.JobClient.Resources)) + assert.Empty(t, (c.JobClient.Resources)) // Job is created in Pending phase. At this point it has a UID but no start time job := &batchv1.Job{} job.Name = "job1" job.UID = "11111111-2222-3333-4444-555555555555" c.JobClient.handleResourceAdd(job) - assert.Equal(t, 1, len(c.JobClient.Resources)) + assert.Len(t, c.JobClient.Resources, 1) got := c.JobClient.Resources[newResourceIdentifier("resource_attribute", "k8s.job.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "job1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -688,7 +688,7 @@ func TestJobCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) job.CreationTimestamp = startTime c.JobClient.handleResourceUpdate(&batchv1.Job{}, job) - assert.Equal(t, 1, len(c.JobClient.Resources)) + assert.Len(t, c.JobClient.Resources, 1) got = c.JobClient.Resources[newResourceIdentifier("resource_attribute", "k8s.job.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "job1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -703,7 +703,7 @@ func TestJobUpdate(t *testing.T) { } func TestJobExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) job := &batchv1.Job{ ObjectMeta: metav1.ObjectMeta{ @@ -802,14 +802,14 @@ func TestCronJobAdd(t *testing.T) { // correctly func TestCronJobCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.CronJobClient.Resources)) + assert.Empty(t, c.CronJobClient.Resources) // CronJob is created in Pending phase. At this point it has a UID but no start time cronJob := &batchv1.CronJob{} cronJob.Name = "cronJob1" cronJob.UID = "11111111-2222-3333-4444-555555555555" c.CronJobClient.handleResourceAdd(cronJob) - assert.Equal(t, 1, len(c.CronJobClient.Resources)) + assert.Len(t, c.CronJobClient.Resources, 1) got := c.CronJobClient.Resources[newResourceIdentifier("resource_attribute", "k8s.cronjob.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "cronJob1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -817,7 +817,7 @@ func TestCronJobCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) cronJob.CreationTimestamp = startTime c.CronJobClient.handleResourceUpdate(&batchv1.CronJob{}, cronJob) - assert.Equal(t, 1, len(c.CronJobClient.Resources)) + assert.Len(t, c.CronJobClient.Resources, 1) got = c.CronJobClient.Resources[newResourceIdentifier("resource_attribute", "k8s.cronjob.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "cronJob1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -832,7 +832,7 @@ func TestCronJobUpdate(t *testing.T) { } func TestCronJobExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) cronJob := &batchv1.CronJob{ ObjectMeta: metav1.ObjectMeta{ @@ -932,14 +932,14 @@ func TestNodeAdd(t *testing.T) { // correctly func TestNodeCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.NodeClient.Resources)) + assert.Empty(t, c.NodeClient.Resources) // Node is created in Pending phase. At this point it has a UID but no start time node := &corev1.Node{} node.Name = "node1" node.UID = "11111111-2222-3333-4444-555555555555" c.NodeClient.handleResourceAdd(node) - assert.Equal(t, 1, len(c.NodeClient.Resources)) + assert.Len(t, c.NodeClient.Resources, 1) got := c.NodeClient.Resources[newResourceIdentifier("resource_attribute", "k8s.node.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "node1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -947,7 +947,7 @@ func TestNodeCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) node.CreationTimestamp = startTime c.NodeClient.handleResourceUpdate(&corev1.Node{}, node) - assert.Equal(t, 1, len(c.NodeClient.Resources)) + assert.Len(t, c.NodeClient.Resources, 1) got = c.NodeClient.Resources[newResourceIdentifier("resource_attribute", "k8s.node.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "node1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -962,7 +962,7 @@ func TestNodeUpdate(t *testing.T) { } func TestNodeExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) node := &corev1.Node{ ObjectMeta: metav1.ObjectMeta{ @@ -1061,14 +1061,14 @@ func TestPersistentVolumeAdd(t *testing.T) { // TestPersistentVolumeCreate tests that a new PersistentVolume func TestPersistentVolumeCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.PersistentVolumeClient.Resources)) + assert.Empty(t, c.PersistentVolumeClient.Resources) // PersistentVolume is created in Pending phase. At this point it has a UID but no start time persistentVolume := &corev1.PersistentVolume{} persistentVolume.Name = "persistentVolume1" persistentVolume.UID = "11111111-2222-3333-4444-555555555555" c.PersistentVolumeClient.handleResourceAdd(persistentVolume) - assert.Equal(t, 1, len(c.PersistentVolumeClient.Resources)) + assert.Len(t, c.PersistentVolumeClient.Resources, 1) got := c.PersistentVolumeClient.Resources[newResourceIdentifier("resource_attribute", "k8s.persistentvolume.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "persistentVolume1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1076,7 +1076,7 @@ func TestPersistentVolumeCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) persistentVolume.CreationTimestamp = startTime c.PersistentVolumeClient.handleResourceUpdate(&corev1.PersistentVolume{}, persistentVolume) - assert.Equal(t, 1, len(c.PersistentVolumeClient.Resources)) + assert.Len(t, c.PersistentVolumeClient.Resources, 1) got = c.PersistentVolumeClient.Resources[newResourceIdentifier("resource_attribute", "k8s.persistentvolume.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "persistentVolume1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1091,7 +1091,7 @@ func TestPersistentVolumeUpdate(t *testing.T) { } func TestPersistentVolumeExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) persistentVolume := &corev1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ @@ -1190,14 +1190,14 @@ func TestPersistentVolumeClaimAdd(t *testing.T) { // TestPersistentVolumeClaimCreate tests that a new PersistentVolumeClaim func TestPersistentVolumeClaimCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.PersistentVolumeClaimClient.Resources)) + assert.Empty(t, c.PersistentVolumeClaimClient.Resources) // PersistentVolumeClaim is created in Pending phase. At this point it has a UID but no start time persistentVolumeClaim := &corev1.PersistentVolumeClaim{} persistentVolumeClaim.Name = "persistentVolumeClaim1" persistentVolumeClaim.UID = "11111111-2222-3333-4444-555555555555" c.PersistentVolumeClaimClient.handleResourceAdd(persistentVolumeClaim) - assert.Equal(t, 1, len(c.PersistentVolumeClaimClient.Resources)) + assert.Len(t, c.PersistentVolumeClaimClient.Resources, 1) got := c.PersistentVolumeClaimClient.Resources[newResourceIdentifier("resource_attribute", "k8s.persistentvolumeclaim.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "persistentVolumeClaim1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1205,7 +1205,7 @@ func TestPersistentVolumeClaimCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) persistentVolumeClaim.CreationTimestamp = startTime c.PersistentVolumeClaimClient.handleResourceUpdate(&corev1.PersistentVolumeClaim{}, persistentVolumeClaim) - assert.Equal(t, 1, len(c.PersistentVolumeClaimClient.Resources)) + assert.Len(t, c.PersistentVolumeClaimClient.Resources, 1) got = c.PersistentVolumeClaimClient.Resources[newResourceIdentifier("resource_attribute", "k8s.persistentvolumeclaim.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "persistentVolumeClaim1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1220,7 +1220,7 @@ func TestPersistentVolumeClaimUpdate(t *testing.T) { } func TestPersistentVolumeClaimExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) persistentVolumeClaim := &corev1.PersistentVolumeClaim{ ObjectMeta: metav1.ObjectMeta{ @@ -1319,14 +1319,14 @@ func TestServiceAdd(t *testing.T) { // TestServiceCreate tests that a new Service func TestServiceCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.ServiceClient.Resources)) + assert.Empty(t, c.ServiceClient.Resources) // Service is created in Pending phase. At this point it has a UID but no start time service := &corev1.Service{} service.Name = "service1" service.UID = "11111111-2222-3333-4444-555555555555" c.ServiceClient.handleResourceAdd(service) - assert.Equal(t, 1, len(c.ServiceClient.Resources)) + assert.Len(t, c.ServiceClient.Resources, 1) got := c.ServiceClient.Resources[newResourceIdentifier("resource_attribute", "k8s.service.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "service1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1334,7 +1334,7 @@ func TestServiceCreate(t *testing.T) { startTime := metav1.NewTime(time.Now()) service.CreationTimestamp = startTime c.ServiceClient.handleResourceUpdate(&corev1.Service{}, service) - assert.Equal(t, 1, len(c.ServiceClient.Resources)) + assert.Len(t, c.ServiceClient.Resources, 1) got = c.ServiceClient.Resources[newResourceIdentifier("resource_attribute", "k8s.service.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "service1", got.GetName()) assert.Equal(t, "11111111-2222-3333-4444-555555555555", got.GetUID()) @@ -1349,7 +1349,7 @@ func TestServiceUpdate(t *testing.T) { } func TestServiceExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) service := &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -1442,7 +1442,7 @@ func TestResourceDeleteLoop(t *testing.T) { c, _ := newTestClient(t) deploymentAddAndUpdateTest(t, c, c.DeploymentClient.handleResourceAdd) - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) deployment := &appsv1.Deployment{} deployment.Name = "deploymentA" @@ -1454,18 +1454,18 @@ func TestResourceDeleteLoop(t *testing.T) { go func() { time.Sleep(time.Millisecond * 50) c.m.Lock() - assert.Equal(t, 1, len(c.DeploymentClient.Resources)) + assert.Len(t, c.DeploymentClient.Resources, 1) c.m.Unlock() c.deleteMut.Lock() - assert.Equal(t, 1, len(c.DeploymentClient.deleteQueue)) + assert.Len(t, c.DeploymentClient.deleteQueue, 1) c.deleteMut.Unlock() time.Sleep(gracePeriod + (time.Millisecond * 50)) c.m.Lock() - assert.Equal(t, 0, len(c.DeploymentClient.Resources)) + assert.Empty(t, c.DeploymentClient.Resources) c.m.Unlock() c.deleteMut.Lock() - assert.Equal(t, 0, len(c.DeploymentClient.deleteQueue)) + assert.Empty(t, c.DeploymentClient.deleteQueue) c.deleteMut.Unlock() close(c.stopCh) }() @@ -1473,7 +1473,7 @@ func TestResourceDeleteLoop(t *testing.T) { } func TestExtractResourceLabelsAnnotations(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) testCases := []struct { name string shouldExtractDeployment bool @@ -1533,13 +1533,13 @@ func TestExtractResourceLabelsAnnotations(t *testing.T) { // Utility function for add and update tests func resourceAddAndUpdateTest(t *testing.T, resourceType string, resource metav1.Object, client *WatchResourceClient[KubernetesResource], handler func(obj any)) { - assert.Equal(t, 0, len(client.Resources)) + assert.Empty(t, client.Resources) resourceUID := "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" resource.SetName("resourceA") resource.SetUID(types.UID(resourceUID)) handler(resource) - assert.Equal(t, 1, len(client.Resources)) + assert.Len(t, client.Resources, 1) got := client.Resources[newResourceIdentifier("resource_attribute", "k8s."+resourceType+".uid", resourceUID)] assert.Equal(t, "resourceA", got.GetName()) assert.Equal(t, resourceUID, string(got.GetUID())) diff --git a/src/processor/k8sattributesprocessor/internal/kube/client_test.go b/src/processor/k8sattributesprocessor/internal/kube/client_test.go index b29e7aa3..3b3b74dd 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/client_test.go +++ b/src/processor/k8sattributesprocessor/internal/kube/client_test.go @@ -30,6 +30,8 @@ import ( "go.uber.org/zap/zaptest/observer" api_v1 "k8s.io/api/core/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" @@ -59,18 +61,18 @@ func newPodIdentifier(from string, name string, value string) PodIdentifier { } func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) // pod without IP pod := &api_v1.Pod{} handler(pod) - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) pod = &api_v1.Pod{} pod.Name = "podA" pod.Status.PodIP = "1.1.1.1" handler(pod) - assert.Equal(t, 2, len(c.Pods)) + assert.Len(t, c.Pods, 2) got := c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] assert.Equal(t, "1.1.1.1", got.Address) assert.Equal(t, "podA", got.Name) @@ -80,7 +82,7 @@ func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { pod.Name = "podB" pod.Status.PodIP = "1.1.1.1" handler(pod) - assert.Equal(t, 2, len(c.Pods)) + assert.Len(t, c.Pods, 2) got = c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] assert.Equal(t, "1.1.1.1", got.Address) assert.Equal(t, "podB", got.Name) @@ -91,7 +93,7 @@ func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { pod.Status.PodIP = "2.2.2.2" pod.UID = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" handler(pod) - assert.Equal(t, 5, len(c.Pods)) + assert.Len(t, c.Pods, 5) got = c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "2.2.2.2")] assert.Equal(t, "2.2.2.2", got.Address) assert.Equal(t, "podC", got.Name) @@ -103,16 +105,16 @@ func podAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { } func namespaceAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj any)) { - assert.Equal(t, 0, len(c.Namespaces)) + assert.Empty(t, c.Namespaces) namespace := &api_v1.Namespace{} handler(namespace) - assert.Equal(t, 0, len(c.Namespaces)) + assert.Empty(t, c.Namespaces) namespace = &api_v1.Namespace{} namespace.Name = "namespaceA" handler(namespace) - assert.Equal(t, 1, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 1) got := c.Namespaces["namespaceA"] assert.Equal(t, "namespaceA", got.Name) assert.Equal(t, "", got.NamespaceUID) @@ -121,19 +123,18 @@ func namespaceAddAndUpdateTest(t *testing.T, c *WatchClient, handler func(obj an namespace.Name = "namespaceB" namespace.UID = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" handler(namespace) - assert.Equal(t, 2, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 2) got = c.Namespaces["namespaceB"] assert.Equal(t, "namespaceB", got.Name) assert.Equal(t, "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", got.NamespaceUID) } func TestDefaultClientset(t *testing.T) { - c, err := New(componenttest.NewNopTelemetrySettings(), k8sconfig.APIConfig{}, ExtractionRules{}, Filters{}, []Association{}, Excludes{}, nil, nil, nil, map[string]*ClientResource{}) - assert.Error(t, err) - assert.Equal(t, "invalid authType for kubernetes: ", err.Error()) + c, err := New(componenttest.NewNopTelemetrySettings(), k8sconfig.APIConfig{}, ExtractionRules{}, Filters{}, []Association{}, Excludes{}, nil, nil, nil, false, 10*time.Second, map[string]*ClientResource{}) + require.EqualError(t, err, "invalid authType for kubernetes: ") assert.Nil(t, c) - c, err = New(componenttest.NewNopTelemetrySettings(), k8sconfig.APIConfig{}, ExtractionRules{}, Filters{}, []Association{}, Excludes{}, newFakeAPIClientset, nil, nil, map[string]*ClientResource{}) + c, err = New(componenttest.NewNopTelemetrySettings(), k8sconfig.APIConfig{}, ExtractionRules{}, Filters{}, []Association{}, Excludes{}, newFakeAPIClientset, nil, nil, false, 10*time.Second, map[string]*ClientResource{}) assert.NoError(t, err) assert.NotNil(t, c) } @@ -149,14 +150,19 @@ func TestBadFilters(t *testing.T) { newFakeAPIClientset, NewFakeInformer, NewFakeNamespaceInformer, + false, + 10*time.Second, map[string]*ClientResource{ - MetadataFromDeployment: newEmptyClientResource(), - MetadataFromStatefulSet: newEmptyClientResource(), - MetadataFromReplicaSet: newEmptyClientResource(), - MetadataFromDaemonSet: newEmptyClientResource(), - MetadataFromJob: newEmptyClientResource(), - MetadataFromCronJob: newEmptyClientResource(), - MetadataFromNode: newEmptyClientResource(), + MetadataFromDeployment: newEmptyClientResource(), + MetadataFromStatefulSet: newEmptyClientResource(), + MetadataFromReplicaSet: newEmptyClientResource(), + MetadataFromDaemonSet: newEmptyClientResource(), + MetadataFromJob: newEmptyClientResource(), + MetadataFromCronJob: newEmptyClientResource(), + MetadataFromNode: newEmptyClientResource(), + MetadataFromPersistentVolume: newEmptyClientResource(), + MetadataFromPersistentVolumeClaim: newEmptyClientResource(), + MetadataFromService: newEmptyClientResource(), }, ) assert.Error(t, err) @@ -173,7 +179,7 @@ func TestClientStartStop(t *testing.T) { done := make(chan struct{}) assert.False(t, fctr.HasStopped()) go func() { - c.Start() + assert.NoError(t, c.Start()) close(done) }() c.Stop() @@ -204,18 +210,22 @@ func TestConstructorErrors(t *testing.T) { clientProvider, NewFakeInformer, NewFakeNamespaceInformer, + false, + 10*time.Second, map[string]*ClientResource{ - MetadataFromDeployment: newEmptyClientResource(), - MetadataFromStatefulSet: newEmptyClientResource(), - MetadataFromReplicaSet: newEmptyClientResource(), - MetadataFromDaemonSet: newEmptyClientResource(), - MetadataFromJob: newEmptyClientResource(), - MetadataFromCronJob: newEmptyClientResource(), - MetadataFromNode: newEmptyClientResource(), + MetadataFromDeployment: newEmptyClientResource(), + MetadataFromStatefulSet: newEmptyClientResource(), + MetadataFromReplicaSet: newEmptyClientResource(), + MetadataFromDaemonSet: newEmptyClientResource(), + MetadataFromJob: newEmptyClientResource(), + MetadataFromCronJob: newEmptyClientResource(), + MetadataFromNode: newEmptyClientResource(), + MetadataFromPersistentVolume: newEmptyClientResource(), + MetadataFromPersistentVolumeClaim: newEmptyClientResource(), + MetadataFromService: newEmptyClientResource(), }) assert.Nil(t, c) - assert.Error(t, err) - assert.Equal(t, "error creating k8s client", err.Error()) + require.EqualError(t, err, "error creating k8s client") assert.Equal(t, apiCfg, gotAPIConfig) }) } @@ -232,7 +242,7 @@ func TestNamespaceAdd(t *testing.T) { func TestPodHostNetwork(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) // pod will not be added if no rule matches pod := &api_v1.Pod{} @@ -240,7 +250,7 @@ func TestPodHostNetwork(t *testing.T) { pod.Status.PodIP = "1.1.1.1" pod.Spec.HostNetwork = true c.handlePodAdd(pod) - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) // pod will be added if rule matches pod.Name = "podB" @@ -248,7 +258,7 @@ func TestPodHostNetwork(t *testing.T) { pod.UID = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" pod.Spec.HostNetwork = true c.handlePodAdd(pod) - assert.Equal(t, 1, len(c.Pods)) + assert.Len(t, c.Pods, 1) got := c.Pods[newPodIdentifier("resource_attribute", "k8s.pod.uid", "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")] assert.Equal(t, "2.2.2.2", got.Address) assert.Equal(t, "podB", got.Name) @@ -260,14 +270,14 @@ func TestPodHostNetwork(t *testing.T) { // correctly func TestPodCreate(t *testing.T) { c, _ := newTestClient(t) - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) // pod is created in Pending phase. At this point it has a UID but no start time or pod IP address pod := &api_v1.Pod{} pod.Name = "podD" pod.UID = "11111111-2222-3333-4444-555555555555" c.handlePodAdd(pod) - assert.Equal(t, 1, len(c.Pods)) + assert.Len(t, c.Pods, 1) got := c.Pods[newPodIdentifier("resource_attribute", "k8s.pod.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "", got.Address) assert.Equal(t, "podD", got.Name) @@ -278,7 +288,7 @@ func TestPodCreate(t *testing.T) { startTime := meta_v1.NewTime(time.Now()) pod.Status.StartTime = &startTime c.handlePodUpdate(&api_v1.Pod{}, pod) - assert.Equal(t, 1, len(c.Pods)) + assert.Len(t, c.Pods, 1) got = c.Pods[newPodIdentifier("resource_attribute", "k8s.pod.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "", got.Address) assert.Equal(t, "podD", got.Name) @@ -287,7 +297,7 @@ func TestPodCreate(t *testing.T) { // pod is Running and has an IP address pod.Status.PodIP = "3.3.3.3" c.handlePodUpdate(&api_v1.Pod{}, pod) - assert.Equal(t, 3, len(c.Pods)) + assert.Len(t, c.Pods, 3) got = c.Pods[newPodIdentifier("resource_attribute", "k8s.pod.uid", "11111111-2222-3333-4444-555555555555")] assert.Equal(t, "3.3.3.3", got.Address) assert.Equal(t, "podD", got.Name) @@ -314,7 +324,7 @@ func TestPodAddOutOfSync(t *testing.T) { }, }, }) - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) pod := &api_v1.Pod{} pod.Name = "podA" @@ -322,7 +332,7 @@ func TestPodAddOutOfSync(t *testing.T) { startTime := meta_v1.NewTime(time.Now()) pod.Status.StartTime = &startTime c.handlePodAdd(pod) - assert.Equal(t, 3, len(c.Pods)) + assert.Len(t, c.Pods, 3) got := c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] assert.Equal(t, "1.1.1.1", got.Address) assert.Equal(t, "podA", got.Name) @@ -336,7 +346,7 @@ func TestPodAddOutOfSync(t *testing.T) { startTime2 := meta_v1.NewTime(time.Now().Add(-time.Second * 10)) pod2.Status.StartTime = &startTime2 c.handlePodAdd(pod2) - assert.Equal(t, 4, len(c.Pods)) + assert.Len(t, c.Pods, 4) got = c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] assert.Equal(t, "1.1.1.1", got.Address) assert.Equal(t, "podA", got.Name) @@ -364,7 +374,7 @@ func TestNamespaceUpdate(t *testing.T) { func TestPodDelete(t *testing.T) { c, _ := newTestClient(t) podAddAndUpdateTest(t, c, c.handlePodAdd) - assert.Equal(t, 5, len(c.Pods)) + assert.Len(t, c.Pods, 5) assert.Equal(t, "1.1.1.1", c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")].Address) // delete empty IP pod @@ -375,10 +385,10 @@ func TestPodDelete(t *testing.T) { pod := &api_v1.Pod{} pod.Status.PodIP = "9.9.9.9" c.handlePodDelete(pod) - assert.Equal(t, 5, len(c.Pods)) + assert.Len(t, c.Pods, 5) got := c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] assert.Equal(t, "1.1.1.1", got.Address) - assert.Equal(t, 0, len(c.deleteQueue)) + assert.Empty(t, c.deleteQueue) // delete matching IP with wrong name/different pod c.deleteQueue = c.deleteQueue[:0] @@ -386,9 +396,9 @@ func TestPodDelete(t *testing.T) { pod.Status.PodIP = "1.1.1.1" c.handlePodDelete(pod) got = c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")] - assert.Equal(t, 5, len(c.Pods)) + assert.Len(t, c.Pods, 5) assert.Equal(t, "1.1.1.1", got.Address) - assert.Equal(t, 0, len(c.deleteQueue)) + assert.Empty(t, c.deleteQueue) // delete matching IP and name c.deleteQueue = c.deleteQueue[:0] @@ -397,8 +407,8 @@ func TestPodDelete(t *testing.T) { pod.Status.PodIP = "1.1.1.1" tsBeforeDelete := time.Now() c.handlePodDelete(pod) - assert.Equal(t, 5, len(c.Pods)) - assert.Equal(t, 3, len(c.deleteQueue)) + assert.Len(t, c.Pods, 5) + assert.Len(t, c.deleteQueue, 3) deleteRequest := c.deleteQueue[0] assert.Equal(t, newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1"), deleteRequest.id) assert.Equal(t, "podB", deleteRequest.podName) @@ -413,8 +423,8 @@ func TestPodDelete(t *testing.T) { pod.UID = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" tsBeforeDelete = time.Now() c.handlePodDelete(cache.DeletedFinalStateUnknown{Obj: pod}) - assert.Equal(t, 5, len(c.Pods)) - assert.Equal(t, 5, len(c.deleteQueue)) + assert.Len(t, c.Pods, 5) + assert.Len(t, c.deleteQueue, 5) deleteRequest = c.deleteQueue[0] assert.Equal(t, newPodIdentifier("connection", "k8s.pod.ip", "2.2.2.2"), deleteRequest.id) assert.Equal(t, "podC", deleteRequest.podName) @@ -430,7 +440,7 @@ func TestPodDelete(t *testing.T) { func TestNamespaceDelete(t *testing.T) { c, _ := newTestClient(t) namespaceAddAndUpdateTest(t, c, c.handleNamespaceAdd) - assert.Equal(t, 2, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 2) assert.Equal(t, "namespaceA", c.Namespaces["namespaceA"].Name) // delete empty namespace @@ -440,32 +450,32 @@ func TestNamespaceDelete(t *testing.T) { namespace := &api_v1.Namespace{} namespace.Name = "namespaceC" c.handleNamespaceDelete(namespace) - assert.Equal(t, 2, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 2) got := c.Namespaces["namespaceA"] assert.Equal(t, "namespaceA", got.Name) // delete non-existent namespace when DeletedFinalStateUnknown c.handleNamespaceDelete(cache.DeletedFinalStateUnknown{Obj: namespace}) - assert.Equal(t, 2, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 2) got = c.Namespaces["namespaceA"] assert.Equal(t, "namespaceA", got.Name) // delete namespace A namespace.Name = "namespaceA" c.handleNamespaceDelete(namespace) - assert.Equal(t, 1, len(c.Namespaces)) + assert.Len(t, c.Namespaces, 1) got = c.Namespaces["namespaceB"] assert.Equal(t, "namespaceB", got.Name) // delete namespace B when DeletedFinalStateUnknown namespace.Name = "namespaceB" c.handleNamespaceDelete(cache.DeletedFinalStateUnknown{Obj: namespace}) - assert.Equal(t, 0, len(c.Namespaces)) + assert.Empty(t, c.Namespaces) } func TestDeleteQueue(t *testing.T) { c, _ := newTestClient(t) podAddAndUpdateTest(t, c, c.handlePodAdd) - assert.Equal(t, 5, len(c.Pods)) + assert.Len(t, c.Pods, 5) assert.Equal(t, "1.1.1.1", c.Pods[newPodIdentifier("connection", "k8s.pod.ip", "1.1.1.1")].Address) // delete pod @@ -473,8 +483,8 @@ func TestDeleteQueue(t *testing.T) { pod.Name = "podB" pod.Status.PodIP = "1.1.1.1" c.handlePodDelete(pod) - assert.Equal(t, 5, len(c.Pods)) - assert.Equal(t, 3, len(c.deleteQueue)) + assert.Len(t, c.Pods, 5) + assert.Len(t, c.deleteQueue, 3) } func TestDeleteLoop(t *testing.T) { @@ -484,30 +494,30 @@ func TestDeleteLoop(t *testing.T) { pod := &api_v1.Pod{} pod.Status.PodIP = "1.1.1.1" c.handlePodAdd(pod) - assert.Equal(t, 2, len(c.Pods)) - assert.Equal(t, 0, len(c.deleteQueue)) + assert.Len(t, c.Pods, 2) + assert.Empty(t, c.deleteQueue) c.handlePodDelete(pod) - assert.Equal(t, 2, len(c.Pods)) - assert.Equal(t, 3, len(c.deleteQueue)) + assert.Len(t, c.Pods, 2) + assert.Len(t, c.deleteQueue, 3) gracePeriod := time.Millisecond * 500 go c.deleteLoop(time.Millisecond, gracePeriod) go func() { time.Sleep(time.Millisecond * 50) c.m.Lock() - assert.Equal(t, 2, len(c.Pods)) + assert.Len(t, c.Pods, 2) c.m.Unlock() c.deleteMut.Lock() - assert.Equal(t, 3, len(c.deleteQueue)) + assert.Len(t, c.deleteQueue, 3) c.deleteMut.Unlock() time.Sleep(gracePeriod + (time.Millisecond * 50)) c.m.Lock() - assert.Equal(t, 0, len(c.Pods)) + assert.Empty(t, c.Pods) c.m.Unlock() c.deleteMut.Lock() - assert.Equal(t, 0, len(c.deleteQueue)) + assert.Empty(t, c.deleteQueue) c.deleteMut.Unlock() close(c.stopCh) }() @@ -526,7 +536,7 @@ func TestGetIgnoredPod(t *testing.T) { } func TestHandlerWrongType(t *testing.T) { - c, logs := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, logs := newTestClientWithRulesAndFilters(t, Filters{}) assert.Equal(t, 0, logs.Len()) c.handlePodAdd(1) c.handlePodDelete(1) @@ -538,7 +548,7 @@ func TestHandlerWrongType(t *testing.T) { } func TestExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) // Disable saving ip into k8s.pod.ip c.Associations[0].Sources[0].Name = "" @@ -848,7 +858,7 @@ func TestExtractionRules(t *testing.T) { } func TestNamespaceExtractionRules(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) namespace := &api_v1.Namespace{ ObjectMeta: meta_v1.ObjectMeta{ @@ -992,14 +1002,13 @@ func TestFilters(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, tc.filters) + c, _ := newTestClientWithRulesAndFilters(t, tc.filters) inf := c.informer.(*FakeInformer) assert.Equal(t, tc.filters.Namespace, inf.namespace) assert.Equal(t, tc.labels, inf.labelSelector.String()) assert.Equal(t, tc.fields, inf.fieldSelector.String()) }) } - } func TestPodIgnorePatterns(t *testing.T) { @@ -1095,17 +1104,21 @@ func Test_extractPodContainersAttributes(t *testing.T) { Containers: []api_v1.Container{ { Name: "container1", - Image: "test/image1:0.1.0", + Image: "example.com:5000/test/image1:0.1.0", }, { Name: "container2", - Image: "example.com:port1/image2:0.2.0", + Image: "example.com:81/image2@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", + }, + { + Name: "container3", + Image: "example-website.com/image3:1.0@sha256:4b0b1b6f6cdd3e5b9e55f74a1e8d19ed93a3f5a04c6b6c3c57c4e6d19f6b7c4d", }, }, InitContainers: []api_v1.Container{ { Name: "init_container", - Image: "test/init-image:1.0.2", + Image: "test/init-image", }, }, }, @@ -1120,7 +1133,13 @@ func Test_extractPodContainersAttributes(t *testing.T) { { Name: "container2", ContainerID: "docker://container2-id-456", - ImageID: "sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", + ImageID: "sha256:4b0b1b6f6cdd3e5b9e55f74a1e8d19ed93a3f5a04c6b6c3c57c4e6d19f6b7c4d", + RestartCount: 2, + }, + { + Name: "container3", + ContainerID: "docker://container3-id-abc", + ImageID: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", RestartCount: 2, }, }, @@ -1164,13 +1183,15 @@ func Test_extractPodContainersAttributes(t *testing.T) { pod: &pod, want: PodContainers{ ByID: map[string]*Container{ - "container1-id-123": {ImageName: "test/image1"}, - "container2-id-456": {ImageName: "example.com:port1/image2"}, + "container1-id-123": {ImageName: "example.com:5000/test/image1"}, + "container2-id-456": {ImageName: "example.com:81/image2"}, + "container3-id-abc": {ImageName: "example-website.com/image3"}, "init-container-id-789": {ImageName: "test/init-image"}, }, ByName: map[string]*Container{ - "container1": {ImageName: "test/image1"}, - "container2": {ImageName: "example.com:port1/image2"}, + "container1": {ImageName: "example.com:5000/test/image1"}, + "container2": {ImageName: "example.com:81/image2"}, + "container3": {ImageName: "example-website.com/image3"}, "init_container": {ImageName: "test/init-image"}, }, }, @@ -1215,6 +1236,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {ContainerID: "container2-id-456"}, }, }, + "container3-id-abc": { + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc"}, + }, + }, "init-container-id-789": { Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789"}, @@ -1232,6 +1258,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {ContainerID: "container2-id-456"}, }, }, + "container3": { + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc"}, + }, + }, "init_container": { Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789"}, @@ -1258,6 +1289,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {}, }, }, + "container3-id-abc": { + Statuses: map[int]ContainerStatus{ + 2: {ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init-container-id-789": { Statuses: map[int]ContainerStatus{ 0: {ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, @@ -1275,6 +1311,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {}, }, }, + "container3": { + Statuses: map[int]ContainerStatus{ + 2: {ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init_container": { Statuses: map[int]ContainerStatus{ 0: {ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, @@ -1295,22 +1336,28 @@ func Test_extractPodContainersAttributes(t *testing.T) { want: PodContainers{ ByID: map[string]*Container{ "container1-id-123": { - ImageName: "test/image1", + ImageName: "example.com:5000/test/image1", ImageTag: "0.1.0", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "container1-id-123", ImageRepoDigest: "docker.io/otel/collector@sha256:55d008bc28344c3178645d40e7d07df30f9d90abe4b53c3fc4e5e9c0295533da"}, }, }, "container2-id-456": { - ImageName: "example.com:port1/image2", - ImageTag: "0.2.0", + ImageName: "example.com:81/image2", Statuses: map[int]ContainerStatus{ 2: {ContainerID: "container2-id-456"}, }, }, + "container3-id-abc": { + ImageName: "example-website.com/image3", + ImageTag: "1.0", + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc", ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init-container-id-789": { ImageName: "test/init-image", - ImageTag: "1.0.2", + ImageTag: "latest", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789", ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, }, @@ -1318,22 +1365,28 @@ func Test_extractPodContainersAttributes(t *testing.T) { }, ByName: map[string]*Container{ "container1": { - ImageName: "test/image1", + ImageName: "example.com:5000/test/image1", ImageTag: "0.1.0", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "container1-id-123", ImageRepoDigest: "docker.io/otel/collector@sha256:55d008bc28344c3178645d40e7d07df30f9d90abe4b53c3fc4e5e9c0295533da"}, }, }, "container2": { - ImageName: "example.com:port1/image2", - ImageTag: "0.2.0", + ImageName: "example.com:81/image2", Statuses: map[int]ContainerStatus{ 2: {ContainerID: "container2-id-456"}, }, }, + "container3": { + ImageName: "example-website.com/image3", + ImageTag: "1.0", + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc", ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init_container": { ImageName: "test/init-image", - ImageTag: "1.0.2", + ImageTag: "latest", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789", ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, }, @@ -1390,9 +1443,7 @@ func Test_extractField(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := tt.args.r.extractField(tt.args.v); got != tt.want { - t.Errorf("extractField() = %v, want %v", got, tt.want) - } + assert.Equal(t, tt.want, tt.args.r.extractField(tt.args.v), "extractField()") }) } } @@ -1424,7 +1475,7 @@ func TestErrorSelectorsFromFilters(t *testing.T) { } func TestExtractNamespaceLabelsAnnotations(t *testing.T) { - c, _ := newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + c, _ := newTestClientWithRulesAndFilters(t, Filters{}) testCases := []struct { name string shouldExtractNamespace bool @@ -1482,7 +1533,7 @@ func TestExtractNamespaceLabelsAnnotations(t *testing.T) { } } -func newTestClientWithRulesAndFilters(t *testing.T, e ExtractionRules, f Filters) (*WatchClient, *observer.ObservedLogs) { +func newTestClientWithRulesAndFilters(t *testing.T, f Filters) (*WatchClient, *observer.ObservedLogs) { set := componenttest.NewNopTelemetrySettings() observedLogger, logs := observer.New(zapcore.WarnLevel) set.Logger = zap.New(observedLogger) @@ -1513,13 +1564,15 @@ func newTestClientWithRulesAndFilters(t *testing.T, e ExtractionRules, f Filters c, err := New( set, k8sconfig.APIConfig{}, - e, + ExtractionRules{}, f, podAssociations, exclude, newFakeAPIClientset, NewFakeInformer, NewFakeNamespaceInformer, + false, + 10*time.Second, map[string]*ClientResource{ MetadataFromDeployment: newClientResource("k8s.deployment.uid"), MetadataFromStatefulSet: newClientResource("k8s.statefulset.uid"), @@ -1560,5 +1613,80 @@ func newEmptyClientResource() *ClientResource { } func newTestClient(t *testing.T) (*WatchClient, *observer.ObservedLogs) { - return newTestClientWithRulesAndFilters(t, ExtractionRules{}, Filters{}) + return newTestClientWithRulesAndFilters(t, Filters{}) +} + +type neverSyncedFakeClient struct { + cache.SharedInformer +} + +type neverSyncedResourceEventHandlerRegistration struct { + cache.ResourceEventHandlerRegistration +} + +func (n *neverSyncedResourceEventHandlerRegistration) HasSynced() bool { + return false +} + +func (n *neverSyncedFakeClient) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { + delegate, err := n.SharedInformer.AddEventHandler(handler) + if err != nil { + return nil, err + } + return &neverSyncedResourceEventHandlerRegistration{ResourceEventHandlerRegistration: delegate}, nil +} + +func TestWaitForMetadata(t *testing.T) { + testCases := []struct { + name string + informerProvider InformerProvider + err bool + }{{ + name: "no wait", + informerProvider: NewFakeInformer, + err: false, + }, { + name: "wait but never synced", + informerProvider: func(client kubernetes.Interface, namespace string, labelSelector labels.Selector, fieldSelector fields.Selector) cache.SharedInformer { + return &neverSyncedFakeClient{NewFakeInformer(client, namespace, labelSelector, fieldSelector)} + }, + err: true, + }} + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + c, err := New( + componenttest.NewNopTelemetrySettings(), + k8sconfig.APIConfig{}, + ExtractionRules{}, + Filters{}, + []Association{}, + Excludes{}, + newFakeAPIClientset, + tc.informerProvider, + nil, + true, + 1*time.Second, + map[string]*ClientResource{ + MetadataFromDeployment: newEmptyClientResource(), + MetadataFromStatefulSet: newEmptyClientResource(), + MetadataFromReplicaSet: newEmptyClientResource(), + MetadataFromDaemonSet: newEmptyClientResource(), + MetadataFromJob: newEmptyClientResource(), + MetadataFromCronJob: newEmptyClientResource(), + MetadataFromNode: newEmptyClientResource(), + MetadataFromPersistentVolume: newEmptyClientResource(), + MetadataFromPersistentVolumeClaim: newEmptyClientResource(), + MetadataFromService: newEmptyClientResource(), + }) + require.NoError(t, err) + + err = c.Start() + if tc.err { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } } diff --git a/src/processor/k8sattributesprocessor/internal/kube/fake_informer.go b/src/processor/k8sattributesprocessor/internal/kube/fake_informer.go index fac41676..fd950fb2 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/fake_informer.go +++ b/src/processor/k8sattributesprocessor/internal/kube/fake_informer.go @@ -54,7 +54,7 @@ func (f *FakeInformer) AddEventHandler(handler cache.ResourceEventHandler) (cach } func (f *FakeInformer) AddEventHandlerWithResyncPeriod(_ cache.ResourceEventHandler, _ time.Duration) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil + return f, nil } func (f *FakeInformer) RemoveEventHandler(_ cache.ResourceEventHandlerRegistration) error { @@ -147,8 +147,9 @@ func NewNoOpInformer( func (f *NoOpInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { return f.AddEventHandlerWithResyncPeriod(handler, time.Second) } + func (f *NoOpInformer) AddEventHandlerWithResyncPeriod(_ cache.ResourceEventHandler, _ time.Duration) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil + return f, nil } func (f *NoOpInformer) RemoveEventHandler(_ cache.ResourceEventHandlerRegistration) error { @@ -177,9 +178,11 @@ func (c *NoOpController) Run(stopCh <-chan struct{}) { c.hasStopped = true }() } + func (c *NoOpController) IsStopped() bool { return c.hasStopped } + func (c *NoOpController) HasSynced() bool { return true } diff --git a/src/processor/k8sattributesprocessor/internal/kube/fake_informer_resource.go b/src/processor/k8sattributesprocessor/internal/kube/fake_informer_resource.go index 11f09a08..24205fbc 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/fake_informer_resource.go +++ b/src/processor/k8sattributesprocessor/internal/kube/fake_informer_resource.go @@ -50,7 +50,7 @@ func (f *FakeResourceInformer) AddEventHandler(handler cache.ResourceEventHandle } func (f *FakeResourceInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil + return f, nil } func (f *FakeResourceInformer) RemoveEventHandler(handle cache.ResourceEventHandlerRegistration) error { diff --git a/src/processor/k8sattributesprocessor/internal/kube/informer.go b/src/processor/k8sattributesprocessor/internal/kube/informer.go index ea834e5e..8637a3a7 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/informer.go +++ b/src/processor/k8sattributesprocessor/internal/kube/informer.go @@ -70,7 +70,6 @@ func informerListFuncWithSelectors(client kubernetes.Interface, namespace string opts.FieldSelector = fs.String() return client.CoreV1().Pods(namespace).List(context.Background(), opts) } - } func informerWatchFuncWithSelectors(client kubernetes.Interface, namespace string, ls labels.Selector, fs fields.Selector) cache.WatchFunc { @@ -120,7 +119,6 @@ func namespaceInformerListFunc(client kubernetes.Interface) cache.ListFunc { return func(opts metav1.ListOptions) (runtime.Object, error) { return client.CoreV1().Namespaces().List(context.Background(), opts) } - } func namespaceInformerWatchFunc(client kubernetes.Interface) cache.WatchFunc { diff --git a/src/processor/k8sattributesprocessor/internal/kube/kube.go b/src/processor/k8sattributesprocessor/internal/kube/kube.go index 5905e660..d38c2f35 100644 --- a/src/processor/k8sattributesprocessor/internal/kube/kube.go +++ b/src/processor/k8sattributesprocessor/internal/kube/kube.go @@ -103,7 +103,7 @@ type Client interface { GetPod(PodIdentifier) (*Pod, bool) GetResource(string, ResourceIdentifier) (KubernetesResource, bool) GetNamespace(string) (*Namespace, bool) - Start() + Start() error Stop() } @@ -118,6 +118,8 @@ type ClientProvider func( APIClientsetProvider, InformerProvider, InformerProviderNamespace, + bool, + time.Duration, map[string]*ClientResource) (Client, error) // APIClientsetProvider defines a func type that initializes and return a new kubernetes diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go index ccc4576a..307da2ac 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_config_test.go @@ -83,9 +83,9 @@ func TestResourceAttributesConfig(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cfg := loadResourceAttributesConfig(t, tt.name) - if diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})); diff != "" { - t.Errorf("Config mismatch (-expected +actual):\n%s", diff) - } + diff := cmp.Diff(tt.want, cfg, cmpopts.IgnoreUnexported(ResourceAttributeConfig{})) + require.Emptyf(t, diff, "Config mismatch (-expected +actual):\n%s", diff) + }) } } @@ -101,4 +101,3 @@ func loadResourceAttributesConfig(t *testing.T, name string) ResourceAttributesC require.NoError(t, sub.Unmarshal(&cfg)) return cfg } - diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go index d255a94a..0a9ed07b 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_resource_test.go @@ -9,9 +9,9 @@ import ( ) func TestResourceBuilder(t *testing.T) { - for _, test := range []string{"default", "all_set", "none_set"} { - t.Run(test, func(t *testing.T) { - cfg := loadResourceAttributesConfig(t, test) + for _, tt := range []string{"default", "all_set", "none_set"} { + t.Run(tt, func(t *testing.T) { + cfg := loadResourceAttributesConfig(t, tt) rb := NewResourceBuilder(cfg) rb.SetContainerID("container.id-val") rb.SetContainerImageName("container.image.name-val") @@ -41,7 +41,7 @@ func TestResourceBuilder(t *testing.T) { res := rb.Emit() assert.Equal(t, 0, rb.Emit().Attributes().Len()) // Second call should return empty Resource - switch test { + switch tt { case "default": assert.Equal(t, 8, res.Attributes().Len()) case "all_set": @@ -50,11 +50,11 @@ func TestResourceBuilder(t *testing.T) { assert.Equal(t, 0, res.Attributes().Len()) return default: - assert.Failf(t, "unexpected test case: %s", test) + assert.Failf(t, "unexpected test case: %s", tt) } val, ok := res.Attributes().Get("container.id") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "container.id-val", val.Str()) } @@ -64,7 +64,7 @@ func TestResourceBuilder(t *testing.T) { assert.EqualValues(t, "container.image.name-val", val.Str()) } val, ok = res.Attributes().Get("container.image.repo_digests") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, []any{"container.image.repo_digests-item1", "container.image.repo_digests-item2"}, val.Slice().AsRaw()) } @@ -74,27 +74,27 @@ func TestResourceBuilder(t *testing.T) { assert.EqualValues(t, "container.image.tag-val", val.Str()) } val, ok = res.Attributes().Get("k8s.cluster.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.cluster.uid-val", val.Str()) } val, ok = res.Attributes().Get("k8s.container.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.container.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.cronjob.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.cronjob.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.daemonset.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.daemonset.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.daemonset.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.daemonset.uid-val", val.Str()) } @@ -104,17 +104,17 @@ func TestResourceBuilder(t *testing.T) { assert.EqualValues(t, "k8s.deployment.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.deployment.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.deployment.uid-val", val.Str()) } val, ok = res.Attributes().Get("k8s.job.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.job.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.job.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.job.uid-val", val.Str()) } @@ -129,12 +129,12 @@ func TestResourceBuilder(t *testing.T) { assert.EqualValues(t, "k8s.node.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.pod.hostname") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.pod.hostname-val", val.Str()) } val, ok = res.Attributes().Get("k8s.pod.ip") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.pod.ip-val", val.Str()) } @@ -154,22 +154,22 @@ func TestResourceBuilder(t *testing.T) { assert.EqualValues(t, "k8s.pod.uid-val", val.Str()) } val, ok = res.Attributes().Get("k8s.replicaset.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.replicaset.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.replicaset.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.replicaset.uid-val", val.Str()) } val, ok = res.Attributes().Get("k8s.statefulset.name") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.statefulset.name-val", val.Str()) } val, ok = res.Attributes().Get("k8s.statefulset.uid") - assert.Equal(t, test == "all_set", ok) + assert.Equal(t, tt == "all_set", ok) if ok { assert.EqualValues(t, "k8s.statefulset.uid-val", val.Str()) } diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_status.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_status.go index c79d978c..8760eaf3 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_status.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_status.go @@ -7,13 +7,13 @@ import ( ) var ( - Type = component.MustNewType("swk8sattributes") + Type = component.MustNewType("swk8sattributes") ScopeName = "github.com/solarwinds/swi-k8s-opentelemetry-collector/processor/swk8sattributesprocessor" ) - const ( - LogsStability = component.StabilityLevelBeta - MetricsStability = component.StabilityLevelBeta - TracesStability = component.StabilityLevelBeta + ProfilesStability = component.StabilityLevelDevelopment + LogsStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + TracesStability = component.StabilityLevelBeta ) diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go index 10a7563d..3284fc0d 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go @@ -100,121 +100,122 @@ type TelemetryBuilder struct { OtelsvcK8sServiceDeleted metric.Int64Counter OtelsvcK8sServiceTableSize metric.Int64Gauge OtelsvcK8sServiceUpdated metric.Int64Counter +} - level configtelemetry.Level +// TelemetryBuilderOption applies changes to default builder. +type TelemetryBuilderOption interface { + apply(*TelemetryBuilder) } -// telemetryBuilderOption applies changes to default builder. -type telemetryBuilderOption func(*TelemetryBuilder) +type telemetryBuilderOptionFunc func(mb *TelemetryBuilder) -// WithLevel sets the current telemetry level for the component. -func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { - return func(builder *TelemetryBuilder) { - builder.level = lvl - } +func (tbof telemetryBuilderOptionFunc) apply(mb *TelemetryBuilder) { + tbof(mb) } // NewTelemetryBuilder provides a struct with methods to update all internal telemetry // for a component -func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { - builder := TelemetryBuilder{level: configtelemetry.LevelBasic} +func NewTelemetryBuilder(settings component.TelemetrySettings, options ...TelemetryBuilderOption) (*TelemetryBuilder, error) { + builder := TelemetryBuilder{} for _, op := range options { - op(&builder) + op.apply(&builder) } + builder.meter = Meter(settings) var err, errs error - if builder.level >= configtelemetry.LevelBasic { - builder.meter = Meter(settings) - } else { - builder.meter = noop.Meter{} - } - builder.OtelsvcK8sIPLookupMiss, err = builder.meter.Int64Counter( + builder.OtelsvcK8sIPLookupMiss, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_ip_lookup_miss", metric.WithDescription("Number of times pod by IP lookup failed."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNamespaceAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNamespaceAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_namespace_added", metric.WithDescription("Number of namespace add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNamespaceDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNamespaceDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_namespace_deleted", metric.WithDescription("Number of namespace delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNamespaceUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNamespaceUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_namespace_updated", metric.WithDescription("Number of namespace update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNodeAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNodeAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_node_added", metric.WithDescription("Number of node add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNodeDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNodeDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_node_deleted", metric.WithDescription("Number of node delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sNodeUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sNodeUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_node_updated", metric.WithDescription("Number of node update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPodAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPodAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_pod_added", metric.WithDescription("Number of pod add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPodDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPodDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_pod_deleted", metric.WithDescription("Number of pod delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPodTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sPodTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_pod_table_size", metric.WithDescription("Size of table containing pod info"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPodUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPodUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_pod_updated", metric.WithDescription("Number of pod update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sReplicasetAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sReplicasetAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_replicaset_added", metric.WithDescription("Number of ReplicaSet add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sReplicasetDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sReplicasetDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_replicaset_deleted", metric.WithDescription("Number of ReplicaSet delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sReplicasetUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sReplicasetUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_replicaset_updated", metric.WithDescription("Number of ReplicaSet update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - - err = addAdditionalMeters(&builder) + err = addAdditionalMeters(&builder, settings) errs = errors.Join(errs, err) return &builder, errs } + +func getLeveledMeter(meter metric.Meter, cfgLevel, srvLevel configtelemetry.Level) metric.Meter { + if cfgLevel <= srvLevel { + return meter + } + return noop.Meter{} +} diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_resource.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_resource.go index bd369f2d..d2f739e8 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_resource.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_resource.go @@ -17,33 +17,35 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" ) // addAdditionalMeters adds meters for the custom metrics that are not upstream, like `OtelsvcK8sJobAdded` -func addAdditionalMeters(builder *TelemetryBuilder) error { +func addAdditionalMeters(builder *TelemetryBuilder, settings component.TelemetrySettings) error { var err, errs error // Deployment metrics - builder.OtelsvcK8sDeploymentAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDeploymentAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_deployment_added", metric.WithDescription("Number of deployment add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDeploymentUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDeploymentUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_deployment_updated", metric.WithDescription("Number of deployment update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDeploymentDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDeploymentDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_deployment_deleted", metric.WithDescription("Number of deployment delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDeploymentTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sDeploymentTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_deployment_table_size", metric.WithDescription("Size of table containing deployment info"), metric.WithUnit("1"), @@ -51,25 +53,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // StatefulSet metrics - builder.OtelsvcK8sStatefulSetAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sStatefulSetAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_statefulset_added", metric.WithDescription("Number of statefulset add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sStatefulSetUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sStatefulSetUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_statefulset_updated", metric.WithDescription("Number of statefulset update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sStatefulSetDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sStatefulSetDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_statefulset_deleted", metric.WithDescription("Number of statefulset delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sStatefulSetTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sStatefulSetTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_statefulset_table_size", metric.WithDescription("Size of table containing statefulset info"), metric.WithUnit("1"), @@ -77,7 +79,7 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // ReplicaSet metrics - builder.OtelsvcK8sReplicasetTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sReplicasetTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_replicaset_table_size", metric.WithDescription("Size of table containing replicaset info"), metric.WithUnit("1"), @@ -85,25 +87,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // DaemonSet metrics - builder.OtelsvcK8sDaemonSetAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDaemonSetAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_daemonset_added", metric.WithDescription("Number of daemonset add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDaemonSetUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDaemonSetUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_daemonset_updated", metric.WithDescription("Number of daemonset update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDaemonSetDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sDaemonSetDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_daemonset_deleted", metric.WithDescription("Number of daemonset delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sDaemonSetTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sDaemonSetTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_daemonset_table_size", metric.WithDescription("Size of table containing daemonset info"), metric.WithUnit("1"), @@ -111,25 +113,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // Job metrics - builder.OtelsvcK8sJobAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sJobAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_job_added", metric.WithDescription("Number of job add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sJobUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sJobUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_job_updated", metric.WithDescription("Number of job update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sJobDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sJobDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_job_deleted", metric.WithDescription("Number of job delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sJobTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sJobTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_job_table_size", metric.WithDescription("Size of table containing job info"), metric.WithUnit("1"), @@ -137,25 +139,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // CronJob metrics - builder.OtelsvcK8sCronJobAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sCronJobAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_cronjob_added", metric.WithDescription("Number of cronjob add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sCronJobUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sCronJobUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_cronjob_updated", metric.WithDescription("Number of cronjob update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sCronJobDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sCronJobDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_cronjob_deleted", metric.WithDescription("Number of cronjob delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sCronJobTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sCronJobTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_cronjob_table_size", metric.WithDescription("Size of table containing cronjob info"), metric.WithUnit("1"), @@ -163,7 +165,7 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // Node metrics - builder.OtelsvcK8sNodeTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sNodeTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_node_table_size", metric.WithDescription("Size of table containing node info"), metric.WithUnit("1"), @@ -171,25 +173,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // Persistent volume metrics - builder.OtelsvcK8sPersistentVolumeAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolume_added", metric.WithDescription("Number of persistentvolume add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolume_updated", metric.WithDescription("Number of persistentvolume update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolume_deleted", metric.WithDescription("Number of persistentvolume delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sPersistentVolumeTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_persistentvolume_table_size", metric.WithDescription("Size of table containing persistentvolume info"), metric.WithUnit("1"), @@ -197,25 +199,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // Persistent volume claim metrics - builder.OtelsvcK8sPersistentVolumeClaimAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeClaimAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolumeclaim_added", metric.WithDescription("Number of persistentvolumeclaim add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeClaimUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeClaimUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolumeclaim_updated", metric.WithDescription("Number of persistentvolumeclaim update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeClaimDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sPersistentVolumeClaimDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_persistentvolumeclaim_deleted", metric.WithDescription("Number of persistentvolumeclaim delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sPersistentVolumeClaimTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sPersistentVolumeClaimTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_persistentvolumeclaim_table_size", metric.WithDescription("Size of table containing persistentvolumeclaim info"), metric.WithUnit("1"), @@ -223,25 +225,25 @@ func addAdditionalMeters(builder *TelemetryBuilder) error { errs = errors.Join(errs, err) // Service metrics - builder.OtelsvcK8sServiceAdded, err = builder.meter.Int64Counter( + builder.OtelsvcK8sServiceAdded, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_service_added", metric.WithDescription("Number of service add events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sServiceUpdated, err = builder.meter.Int64Counter( + builder.OtelsvcK8sServiceUpdated, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_service_updated", metric.WithDescription("Number of service update events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sServiceDeleted, err = builder.meter.Int64Counter( + builder.OtelsvcK8sServiceDeleted, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Counter( "otelcol_otelsvc_k8s_service_deleted", metric.WithDescription("Number of service delete events received"), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.OtelsvcK8sServiceTableSize, err = builder.meter.Int64Gauge( + builder.OtelsvcK8sServiceTableSize, err = getLeveledMeter(builder.meter, configtelemetry.LevelBasic, settings.MetricsLevel).Int64Gauge( "otelcol_otelsvc_k8s_service_table_size", metric.WithDescription("Size of table containing service info"), metric.WithUnit("1"), diff --git a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go index 344b00d9..9d01ed32 100644 --- a/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go +++ b/src/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go @@ -14,6 +14,7 @@ import ( nooptrace "go.opentelemetry.io/otel/trace/noop" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { @@ -63,14 +64,11 @@ func TestProviders(t *testing.T) { } func TestNewTelemetryBuilder(t *testing.T) { - set := component.TelemetrySettings{ - MeterProvider: mockMeterProvider{}, - TracerProvider: mockTracerProvider{}, - } + set := componenttest.NewNopTelemetrySettings() applied := false - _, err := NewTelemetryBuilder(set, func(b *TelemetryBuilder) { + _, err := NewTelemetryBuilder(set, telemetryBuilderOptionFunc(func(b *TelemetryBuilder) { applied = true - }) + })) require.NoError(t, err) require.True(t, applied) } diff --git a/src/processor/k8sattributesprocessor/options.go b/src/processor/k8sattributesprocessor/options.go index 46a0fa80..57e3237f 100644 --- a/src/processor/k8sattributesprocessor/options.go +++ b/src/processor/k8sattributesprocessor/options.go @@ -21,6 +21,7 @@ import ( "fmt" "os" "regexp" + "time" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" "k8s.io/apimachinery/pkg/selection" @@ -450,3 +451,19 @@ func withExcludes(podExclude ExcludeConfig) option { return nil } } + +// withWaitForMetadata allows specifying whether to wait for pod metadata to be synced. +func withWaitForMetadata(wait bool) option { + return func(p *kubernetesprocessor) error { + p.waitForMetadata = wait + return nil + } +} + +// withWaitForMetadataTimeout allows specifying the timeout for waiting for pod metadata to be synced. +func withWaitForMetadataTimeout(timeout time.Duration) option { + return func(p *kubernetesprocessor) error { + p.waitForMetadataTimeout = timeout + return nil + } +} diff --git a/src/processor/k8sattributesprocessor/options_test.go b/src/processor/k8sattributesprocessor/options_test.go index 6f9d88bb..e67607d2 100644 --- a/src/processor/k8sattributesprocessor/options_test.go +++ b/src/processor/k8sattributesprocessor/options_test.go @@ -34,12 +34,11 @@ func TestWithAPIConfig(t *testing.T) { p := &kubernetesprocessor{} apiConfig := k8sconfig.APIConfig{AuthType: "test-auth-type"} err := withAPIConfig(apiConfig)(p) - assert.Error(t, err) - assert.Equal(t, "invalid authType for kubernetes: test-auth-type", err.Error()) + require.EqualError(t, err, "invalid authType for kubernetes: test-auth-type") apiConfig = k8sconfig.APIConfig{AuthType: "kubeConfig"} err = withAPIConfig(apiConfig)(p) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, apiConfig, p.apiConfig) } @@ -178,15 +177,12 @@ func TestWithExtractAnnotations(t *testing.T) { p := &kubernetesprocessor{} opt := withExtractAnnotations(tt.args...) err := opt(p) - if tt.wantError == "" { - assert.NoError(t, err) + if tt.wantError != "" { + require.EqualError(t, err, tt.wantError) } else { - assert.Error(t, err) - assert.Equal(t, tt.wantError, err.Error()) - return + require.NoError(t, err) + assert.Equal(t, tt.want, p.rules.Annotations) } - got := p.rules.Annotations - assert.Equal(t, tt.want, got) }) } } @@ -284,14 +280,12 @@ func TestWithExtractLabels(t *testing.T) { p := &kubernetesprocessor{} opt := withExtractLabels(tt.args...) err := opt(p) - if tt.wantError == "" { - assert.NoError(t, err) + if tt.wantError != "" { + require.EqualError(t, err, tt.wantError) } else { - assert.Error(t, err) - assert.Equal(t, tt.wantError, err.Error()) - return + require.NoError(t, err) + assert.Equal(t, tt.want, p.rules.Labels) } - assert.Equal(t, tt.want, p.rules.Labels) }) } } @@ -432,7 +426,6 @@ func TestWithFilterLabels(t *testing.T) { } func TestWithFilterFields(t *testing.T) { - tests := []struct { name string args []FieldFilterConfig diff --git a/src/processor/k8sattributesprocessor/processor.go b/src/processor/k8sattributesprocessor/processor.go index d05f3596..3eae1789 100644 --- a/src/processor/k8sattributesprocessor/processor.go +++ b/src/processor/k8sattributesprocessor/processor.go @@ -21,12 +21,14 @@ import ( "context" "fmt" "strconv" + "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componentstatus" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" conventions "go.opentelemetry.io/collector/semconv/v1.8.0" "go.uber.org/zap" @@ -40,18 +42,20 @@ const ( ) type kubernetesprocessor struct { - cfg component.Config - options []option - telemetrySettings component.TelemetrySettings - logger *zap.Logger - apiConfig k8sconfig.APIConfig - kc kube.Client - passthroughMode bool - setObjectExistence bool - rules kube.ExtractionRules - filters kube.Filters - podAssociations []kube.Association - podIgnore kube.Excludes + cfg component.Config + options []option + telemetrySettings component.TelemetrySettings + logger *zap.Logger + apiConfig k8sconfig.APIConfig + kc kube.Client + passthroughMode bool + setObjectExistence bool + rules kube.ExtractionRules + filters kube.Filters + podAssociations []kube.Association + podIgnore kube.Excludes + waitForMetadata bool + waitForMetadataTimeout time.Duration resources map[string]*kubernetesProcessorResource } @@ -71,6 +75,8 @@ func (kp *kubernetesprocessor) initKubeClient(set component.TelemetrySettings, k nil, nil, nil, + kp.waitForMetadata, + kp.waitForMetadataTimeout, map[string]*kube.ClientResource{ kube.MetadataFromDeployment: kp.getClientResource(kp.resources[kube.MetadataFromDeployment]), kube.MetadataFromStatefulSet: kp.getClientResource(kp.resources[kube.MetadataFromStatefulSet]), @@ -96,8 +102,9 @@ func (kp *kubernetesprocessor) Start(_ context.Context, host component.Host) err for _, opt := range allOptions { if err := opt(kp); err != nil { + kp.logger.Error("Could not apply option", zap.Error(err)) componentstatus.ReportStatus(host, componentstatus.NewFatalErrorEvent(err)) - return nil + return err } } @@ -106,12 +113,17 @@ func (kp *kubernetesprocessor) Start(_ context.Context, host component.Host) err if kp.kc == nil { err := kp.initKubeClient(kp.telemetrySettings, kubeClientProvider) if err != nil { + kp.logger.Error("Could not initialize kube client", zap.Error(err)) componentstatus.ReportStatus(host, componentstatus.NewFatalErrorEvent(err)) - return nil + return err } } if !kp.passthroughMode { - go kp.kc.Start() + err := kp.kc.Start() + if err != nil { + componentstatus.ReportStatus(host, componentstatus.NewFatalErrorEvent(err)) + return err + } } return nil } @@ -156,6 +168,16 @@ func (kp *kubernetesprocessor) processLogs(ctx context.Context, ld plog.Logs) (p return ld, nil } +// processProfiles process profiles and add k8s metadata using resource IP, hostname or incoming IP as pod origin. +func (kp *kubernetesprocessor) processProfiles(ctx context.Context, pd pprofile.Profiles) (pprofile.Profiles, error) { + rp := pd.ResourceProfiles() + for i := 0; i < rp.Len(); i++ { + kp.processResource(ctx, rp.At(i).Resource()) + } + + return pd, nil +} + // processResource adds Pod metadata tags to resource based on pod association configuration func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pcommon.Resource) { podIdentifierValue := extractPodID(ctx, resource.Attributes(), kp.podAssociations) @@ -163,9 +185,7 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco for i := range podIdentifierValue { if podIdentifierValue[i].Source.From == kube.ConnectionSource && podIdentifierValue[i].Value != "" { - if _, found := resource.Attributes().Get(kube.K8sIPLabelName); !found { - resource.Attributes().PutStr(kube.K8sIPLabelName, podIdentifierValue[i].Value) - } + setResourceAttribute(resource.Attributes(), kube.K8sIPLabelName, podIdentifierValue[i].Value) break } } @@ -180,9 +200,7 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco kp.logger.Debug("getting the pod", zap.Any("pod", pod)) for key, val := range pod.Attributes { - if _, found := resource.Attributes().Get(key); !found { - resource.Attributes().PutStr(key, val) - } + setResourceAttribute(resource.Attributes(), key, val) } kp.addContainerAttributes(resource.Attributes(), pod) } @@ -192,9 +210,7 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco if namespace != "" { attrsToAdd := kp.getAttributesForPodsNamespace(namespace) for key, val := range attrsToAdd { - if _, found := resource.Attributes().Get(key); !found { - resource.Attributes().PutStr(key, val) - } + setResourceAttribute(resource.Attributes(), key, val) } } @@ -205,6 +221,13 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco } } +func setResourceAttribute(attributes pcommon.Map, key string, val string) { + attr, found := attributes.Get(key) + if !found || attr.AsString() == "" { + attributes.PutStr(key, val) + } +} + func getNamespace(pod *kube.Pod, resAttrs pcommon.Map) string { if pod != nil && pod.Namespace != "" { return pod.Namespace @@ -235,19 +258,13 @@ func (kp *kubernetesprocessor) addContainerAttributes(attrs pcommon.Map, pod *ku return } if containerSpec.Name != "" { - if _, found := attrs.Get(conventions.AttributeK8SContainerName); !found { - attrs.PutStr(conventions.AttributeK8SContainerName, containerSpec.Name) - } + setResourceAttribute(attrs, conventions.AttributeK8SContainerName, containerSpec.Name) } if containerSpec.ImageName != "" { - if _, found := attrs.Get(conventions.AttributeContainerImageName); !found { - attrs.PutStr(conventions.AttributeContainerImageName, containerSpec.ImageName) - } + setResourceAttribute(attrs, conventions.AttributeContainerImageName, containerSpec.ImageName) } if containerSpec.ImageTag != "" { - if _, found := attrs.Get(conventions.AttributeContainerImageTag); !found { - attrs.PutStr(conventions.AttributeContainerImageTag, containerSpec.ImageTag) - } + setResourceAttribute(attrs, conventions.AttributeContainerImageTag, containerSpec.ImageTag) } // attempt to get container ID from restart count runID := -1 diff --git a/src/processor/k8sattributesprocessor/processor_resource.go b/src/processor/k8sattributesprocessor/processor_resource.go index fac61ede..1228a631 100644 --- a/src/processor/k8sattributesprocessor/processor_resource.go +++ b/src/processor/k8sattributesprocessor/processor_resource.go @@ -54,9 +54,7 @@ func processGenericResource( kp.logger.Debug(fmt.Sprintf("getting the %s", resourceType), zap.Any(resourceType, k8sResource)) for key, val := range k8sResource.GetAttributes() { - if _, found := resource.Attributes().Get(key); !found { - resource.Attributes().PutStr(key, val) - } + setResourceAttribute(resource.Attributes(), key, val) } if kp.setObjectExistence { diff --git a/src/processor/k8sattributesprocessor/processor_resource_test.go b/src/processor/k8sattributesprocessor/processor_resource_test.go index 754caada..20db33c8 100644 --- a/src/processor/k8sattributesprocessor/processor_resource_test.go +++ b/src/processor/k8sattributesprocessor/processor_resource_test.go @@ -72,6 +72,7 @@ func testProcessorAddResourceLabels(t *testing.T, resourceType, resourceName, re generateTraces(resourceFunc...), generateMetrics(resourceFunc...), generateLogs(resourceFunc...), + generateProfiles(resourceFunc...), func(err error) { assert.NoError(t, err) }) @@ -105,6 +106,7 @@ func TestProcessorNoResources(t *testing.T) { generateTraces(resourceFunc...), generateMetrics(resourceFunc...), generateLogs(resourceFunc...), + generateProfiles(resourceFunc...), func(err error) { assert.NoError(t, err) }) diff --git a/src/processor/k8sattributesprocessor/processor_test.go b/src/processor/k8sattributesprocessor/processor_test.go index 0f0726e9..ed9679c8 100644 --- a/src/processor/k8sattributesprocessor/processor_test.go +++ b/src/processor/k8sattributesprocessor/processor_test.go @@ -28,15 +28,19 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componentstatus" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/consumer/xconsumer" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/processor/xprocessor" conventions "go.opentelemetry.io/collector/semconv/v1.8.0" "github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig" @@ -95,6 +99,19 @@ func newLogsProcessor(cfg component.Config, nextLogsConsumer consumer.Logs, opti ) } +func newProfilesProcessor(cfg component.Config, nextProfilesConsumer xconsumer.Profiles, options ...option) (xprocessor.Profiles, error) { + opts := options + opts = append(opts, withKubeClientProvider(newFakeClient)) + set := processortest.NewNopSettings() + return createProfilesProcessorWithOptions( + context.Background(), + set, + cfg, + nextProfilesConsumer, + opts..., + ) +} + // withKubeClientProvider sets the specific implementation for getting K8s Client instances func withKubeClientProvider(kcp kube.ClientProvider) option { return func(p *kubernetesprocessor) error { @@ -116,14 +133,17 @@ type multiTest struct { tp processor.Traces mp processor.Metrics lp processor.Logs + pp xprocessor.Profiles - nextTrace *consumertest.TracesSink - nextMetrics *consumertest.MetricsSink - nextLogs *consumertest.LogsSink + nextTrace *consumertest.TracesSink + nextMetrics *consumertest.MetricsSink + nextLogs *consumertest.LogsSink + nextProfiles *consumertest.ProfilesSink - kpMetrics *kubernetesprocessor - kpTrace *kubernetesprocessor - kpLogs *kubernetesprocessor + kpMetrics *kubernetesprocessor + kpTrace *kubernetesprocessor + kpLogs *kubernetesprocessor + kpProfiles *kubernetesprocessor } func newMultiTest( @@ -133,15 +153,20 @@ func newMultiTest( options ...option, ) *multiTest { m := &multiTest{ - t: t, - nextTrace: new(consumertest.TracesSink), - nextMetrics: new(consumertest.MetricsSink), - nextLogs: new(consumertest.LogsSink), + t: t, + nextTrace: new(consumertest.TracesSink), + nextMetrics: new(consumertest.MetricsSink), + nextLogs: new(consumertest.LogsSink), + nextProfiles: new(consumertest.ProfilesSink), } tp, err := newTracesProcessor(cfg, m.nextTrace, append(options, withExtractKubernetesProcessorInto(&m.kpTrace))...) require.NoError(t, err) - err = tp.Start(context.Background(), componenttest.NewNopHost()) + err = tp.Start(context.Background(), &nopHost{ + reportFunc: func(event *componentstatus.Event) { + errFunc(event.Err()) + }, + }) if errFunc == nil { assert.NotNil(t, tp) require.NoError(t, err) @@ -149,7 +174,11 @@ func newMultiTest( mp, err := newMetricsProcessor(cfg, m.nextMetrics, append(options, withExtractKubernetesProcessorInto(&m.kpMetrics))...) require.NoError(t, err) - err = mp.Start(context.Background(), componenttest.NewNopHost()) + err = mp.Start(context.Background(), &nopHost{ + reportFunc: func(event *componentstatus.Event) { + errFunc(event.Err()) + }, + }) if errFunc == nil { assert.NotNil(t, tp) require.NoError(t, err) @@ -157,15 +186,32 @@ func newMultiTest( lp, err := newLogsProcessor(cfg, m.nextLogs, append(options, withExtractKubernetesProcessorInto(&m.kpLogs))...) require.NoError(t, err) - err = lp.Start(context.Background(), componenttest.NewNopHost()) + err = lp.Start(context.Background(), &nopHost{ + reportFunc: func(event *componentstatus.Event) { + errFunc(event.Err()) + }, + }) if errFunc == nil { assert.NotNil(t, tp) require.NoError(t, err) } + pp, err := newProfilesProcessor(cfg, m.nextProfiles, append(options, withExtractKubernetesProcessorInto(&m.kpProfiles))...) + require.NoError(t, err) + err = pp.Start(context.Background(), &nopHost{ + reportFunc: func(event *componentstatus.Event) { + errFunc(event.Err()) + }, + }) + if errFunc == nil { + assert.NotNil(t, pp) + require.NoError(t, err) + } + m.tp = tp m.mp = mp m.lp = lp + m.pp = pp return m } @@ -174,12 +220,14 @@ func (m *multiTest) testConsume( traces ptrace.Traces, metrics pmetric.Metrics, logs plog.Logs, + profiles pprofile.Profiles, errFunc func(err error), ) { errs := []error{ m.tp.ConsumeTraces(ctx, traces), m.mp.ConsumeMetrics(ctx, metrics), m.lp.ConsumeLogs(ctx, logs), + m.pp.ConsumeProfiles(ctx, profiles), } for _, err := range errs { @@ -193,24 +241,28 @@ func (m *multiTest) kubernetesProcessorOperation(kpOp func(kp *kubernetesprocess kpOp(m.kpTrace) kpOp(m.kpMetrics) kpOp(m.kpLogs) + kpOp(m.kpProfiles) } func (m *multiTest) assertBatchesLen(batchesLen int) { require.Len(m.t, m.nextTrace.AllTraces(), batchesLen) require.Len(m.t, m.nextMetrics.AllMetrics(), batchesLen) require.Len(m.t, m.nextLogs.AllLogs(), batchesLen) + require.Len(m.t, m.nextProfiles.AllProfiles(), batchesLen) } func (m *multiTest) assertResourceObjectLen(batchNo int) { assert.Equal(m.t, 1, m.nextTrace.AllTraces()[batchNo].ResourceSpans().Len()) assert.Equal(m.t, 1, m.nextMetrics.AllMetrics()[batchNo].ResourceMetrics().Len()) assert.Equal(m.t, 1, m.nextLogs.AllLogs()[batchNo].ResourceLogs().Len()) + assert.Equal(m.t, 1, m.nextProfiles.AllProfiles()[batchNo].ResourceProfiles().Len()) } func (m *multiTest) assertResourceAttributesLen(batchNo int, attrsLen int) { assert.Equal(m.t, attrsLen, m.nextTrace.AllTraces()[batchNo].ResourceSpans().At(0).Resource().Attributes().Len()) assert.Equal(m.t, attrsLen, m.nextMetrics.AllMetrics()[batchNo].ResourceMetrics().At(0).Resource().Attributes().Len()) assert.Equal(m.t, attrsLen, m.nextLogs.AllLogs()[batchNo].ResourceLogs().At(0).Resource().Attributes().Len()) + assert.Equal(m.t, attrsLen, m.nextProfiles.AllProfiles()[batchNo].ResourceProfiles().At(0).Resource().Attributes().Len()) } func (m *multiTest) assertResource(batchNum int, resourceFunc func(res pcommon.Resource)) { @@ -239,13 +291,14 @@ func TestProcessorBadClientProvider(t *testing.T) { _ kube.APIClientsetProvider, _ kube.InformerProvider, _ kube.InformerProviderNamespace, + _ bool, + _ time.Duration, _ map[string]*kube.ClientResource) (kube.Client, error) { return nil, fmt.Errorf("bad client error") } newMultiTest(t, NewFactory().CreateDefaultConfig(), func(err error) { - require.Error(t, err) - assert.Equal(t, "bad client error", err.Error()) + require.EqualError(t, err, "bad client error") }, withKubeClientProvider(clientProvider)) } @@ -286,6 +339,17 @@ func generateLogs(resourceFunc ...generateResourceFunc) plog.Logs { return l } +func generateProfiles(resourceFunc ...generateResourceFunc) pprofile.Profiles { + p := pprofile.NewProfiles() + ps := p.ResourceProfiles().AppendEmpty() + for _, resFun := range resourceFunc { + res := ps.Resource() + resFun(res) + } + ps.ScopeProfiles().AppendEmpty().Profiles().AppendEmpty() + return p +} + func withPassthroughIP(passthroughIP string) generateResourceFunc { return func(res pcommon.Resource) { res.Attributes().PutStr(kube.K8sIPLabelName, passthroughIP) @@ -333,7 +397,6 @@ func (strAddr) Network() string { } func TestIPDetectionFromContext(t *testing.T) { - addresses := []net.Addr{ &net.IPAddr{ IP: net.IPv4(1, 1, 1, 1), @@ -358,6 +421,7 @@ func TestIPDetectionFromContext(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -365,11 +429,10 @@ func TestIPDetectionFromContext(t *testing.T) { m.assertBatchesLen(1) m.assertResourceObjectLen(0) m.assertResource(0, func(r pcommon.Resource) { - require.Greater(t, r.Attributes().Len(), 0) + require.Positive(t, r.Attributes().Len()) assertResourceHasStringAttribute(t, r, "k8s.pod.ip", "1.1.1.1") }) } - } func TestNilBatch(t *testing.T) { @@ -379,6 +442,7 @@ func TestNilBatch(t *testing.T) { ptrace.NewTraces(), pmetric.NewMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -413,6 +477,7 @@ func TestProcessorNoAttrs(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -442,6 +507,7 @@ func TestProcessorNoAttrs(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -459,6 +525,7 @@ func TestProcessorNoAttrs(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -475,7 +542,7 @@ func TestNoIP(t *testing.T) { nil, ) - m.testConsume(context.Background(), generateTraces(), generateMetrics(), generateLogs(), nil) + m.testConsume(context.Background(), generateTraces(), generateMetrics(), generateLogs(), generateProfiles(), nil) m.assertBatchesLen(1) m.assertResourceObjectLen(0) @@ -531,6 +598,7 @@ func TestIPSourceWithoutPodAssociation(t *testing.T) { traces := generateTraces() metrics := generateMetrics() logs := generateLogs() + profiles := generateProfiles() resources := []pcommon.Resource{ traces.ResourceSpans().At(0).Resource(), @@ -546,10 +614,10 @@ func TestIPSourceWithoutPodAssociation(t *testing.T) { } } - m.testConsume(ctx, traces, metrics, logs, nil) + m.testConsume(ctx, traces, metrics, logs, profiles, nil) m.assertBatchesLen(i + 1) m.assertResource(i, func(res pcommon.Resource) { - require.Greater(t, res.Attributes().Len(), 0) + require.Positive(t, res.Attributes().Len()) assertResourceHasStringAttribute(t, res, "k8s.pod.ip", tc.out) }) }) @@ -621,21 +689,23 @@ func TestIPSourceWithPodAssociation(t *testing.T) { traces := generateTraces() metrics := generateMetrics() logs := generateLogs() + profiles := generateProfiles() resources := []pcommon.Resource{ traces.ResourceSpans().At(0).Resource(), metrics.ResourceMetrics().At(0).Resource(), logs.ResourceLogs().At(0).Resource(), + profiles.ResourceProfiles().At(0).Resource(), } for _, res := range resources { res.Attributes().PutStr(tc.labelName, tc.labelValue) } - m.testConsume(ctx, traces, metrics, logs, nil) + m.testConsume(ctx, traces, metrics, logs, profiles, nil) m.assertBatchesLen(i + 1) m.assertResource(i, func(res pcommon.Resource) { - require.Greater(t, res.Attributes().Len(), 0) + require.Positive(t, res.Attributes().Len()) assertResourceHasStringAttribute(t, res, tc.outLabel, tc.outValue) }) }) @@ -673,12 +743,13 @@ func TestPodUID(t *testing.T) { generateTraces(withPodUID("ef10d10b-2da5-4030-812e-5f45c1531227")), generateMetrics(withPodUID("ef10d10b-2da5-4030-812e-5f45c1531227")), generateLogs(withPodUID("ef10d10b-2da5-4030-812e-5f45c1531227")), + generateProfiles(withPodUID("ef10d10b-2da5-4030-812e-5f45c1531227")), nil) m.assertBatchesLen(1) m.assertResourceObjectLen(0) m.assertResource(0, func(r pcommon.Resource) { - require.Greater(t, r.Attributes().Len(), 0) + require.Positive(t, r.Attributes().Len()) assertResourceHasStringAttribute(t, r, "k8s.pod.uid", "ef10d10b-2da5-4030-812e-5f45c1531227") }) } @@ -733,6 +804,7 @@ func TestAddPodLabels(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -740,7 +812,7 @@ func TestAddPodLabels(t *testing.T) { m.assertBatchesLen(i + 1) m.assertResourceObjectLen(i) m.assertResource(i, func(res pcommon.Resource) { - require.Greater(t, res.Attributes().Len(), 0) + require.Positive(t, res.Attributes().Len()) assertResourceHasStringAttribute(t, res, "k8s.pod.ip", ip) for k, v := range attrs { assertResourceHasStringAttribute(t, res, k, v) @@ -810,6 +882,7 @@ func TestAddNamespaceLabels(t *testing.T) { generateTraces(), generateMetrics(), generateLogs(), + generateProfiles(), func(err error) { assert.NoError(t, err) }) @@ -1005,7 +1078,7 @@ func TestProcessorAddContainerAttributes(t *testing.T) { ByName: map[string]*kube.Container{ "app": { Statuses: map[int]kube.ContainerStatus{ - 2: {ImageRepoDigest: "docker.io/otel/collector@sha256:deadbeef02"}, + 2: {ImageRepoDigest: "docker.io/otel/collector:1.2.3@sha256:deadbeef02"}, }, }, }, @@ -1019,7 +1092,7 @@ func TestProcessorAddContainerAttributes(t *testing.T) { wantAttrs: map[string]any{ kube.K8sIPLabelName: "1.1.1.1", conventions.AttributeK8SContainerName: "app", - containerImageRepoDigests: []string{"docker.io/otel/collector@sha256:deadbeef02"}, + containerImageRepoDigests: []string{"docker.io/otel/collector:1.2.3@sha256:deadbeef02"}, }, }, { @@ -1091,6 +1164,7 @@ func TestProcessorAddContainerAttributes(t *testing.T) { generateTraces(tt.resourceGens...), generateMetrics(tt.resourceGens...), generateLogs(tt.resourceGens...), + generateProfiles(tt.resourceGens...), nil, ) @@ -1143,6 +1217,7 @@ func TestProcessorPicksUpPassthoughPodIp(t *testing.T) { generateTraces(withPassthroughIP("2.2.2.2")), generateMetrics(withPassthroughIP("2.2.2.2")), generateLogs(withPassthroughIP("2.2.2.2")), + generateProfiles(withPassthroughIP("2.2.2.2")), func(err error) { assert.NoError(t, err) }) @@ -1164,7 +1239,6 @@ func TestMetricsProcessorHostname(t *testing.T) { p, err := newMetricsProcessor( NewFactory().CreateDefaultConfig(), next, - nil, withExtractMetadata(conventions.AttributeK8SPodName), withExtractKubernetesProcessorInto(&kp), ) @@ -1228,7 +1302,6 @@ func TestMetricsProcessorHostname(t *testing.T) { } }) } - } func TestMetricsProcessorHostnameWithPodAssociation(t *testing.T) { @@ -1237,7 +1310,6 @@ func TestMetricsProcessorHostnameWithPodAssociation(t *testing.T) { p, err := newMetricsProcessor( NewFactory().CreateDefaultConfig(), next, - nil, withExtractMetadata(conventions.AttributeK8SPodName), withExtractKubernetesProcessorInto(&kp), ) @@ -1312,7 +1384,6 @@ func TestMetricsProcessorHostnameWithPodAssociation(t *testing.T) { } }) } - } func TestPassthroughStart(t *testing.T) { @@ -1336,8 +1407,7 @@ func TestRealClient(t *testing.T) { t, NewFactory().CreateDefaultConfig(), func(err error) { - require.Error(t, err) - assert.Equal(t, "unable to load k8s config, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined", err.Error()) + require.EqualError(t, err, "unable to load k8s config, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") }, withKubeClientProvider(kubeClientProvider), withAPIConfig(k8sconfig.APIConfig{AuthType: "none"}), @@ -1360,7 +1430,6 @@ func TestStartStop(t *testing.T) { p, err := newTracesProcessor( NewFactory().CreateDefaultConfig(), consumertest.NewNop(), - nil, withExtractKubernetesProcessorInto(&kp), ) require.NoError(t, err) @@ -1380,14 +1449,14 @@ func TestStartStop(t *testing.T) { func assertResourceHasStringAttribute(t *testing.T, r pcommon.Resource, k, v string) { got, ok := r.Attributes().Get(k) - require.True(t, ok, fmt.Sprintf("resource does not contain attribute %s", k)) + require.Truef(t, ok, "resource does not contain attribute %s", k) assert.EqualValues(t, pcommon.ValueTypeStr, got.Type(), "attribute %s is not of type string", k) assert.EqualValues(t, v, got.Str(), "attribute %s is not equal to %s", k, v) } func assertResourceHasStringSlice(t *testing.T, r pcommon.Resource, k string, v []string) { got, ok := r.Attributes().Get(k) - require.True(t, ok, fmt.Sprintf("resource does not contain attribute %s", k)) + require.Truef(t, ok, "resource does not contain attribute %s", k) assert.EqualValues(t, pcommon.ValueTypeSlice, got.Type(), "attribute %s is not of type slice", k) slice := got.Slice() for i := 0; i < slice.Len(); i++ { @@ -1440,3 +1509,76 @@ func Test_intFromAttribute(t *testing.T) { }) } } + +var _ componentstatus.Reporter = (*nopHost)(nil) + +type nopHost struct { + reportFunc func(event *componentstatus.Event) +} + +func (nh *nopHost) GetExtensions() map[component.ID]component.Component { + return nil +} + +func (nh *nopHost) Report(event *componentstatus.Event) { + nh.reportFunc(event) +} + +func Test_setResourceAttribute(t *testing.T) { + tests := []struct { + name string + attributes func() pcommon.Map + key string + val string + wantAttrs func() pcommon.Map + }{ + { + name: "attribute not present - add value", + attributes: pcommon.NewMap, + key: "foo", + val: "bar", + wantAttrs: func() pcommon.Map { + m := pcommon.NewMap() + m.PutStr("foo", "bar") + return m + }, + }, + { + name: "attribute present with non-empty value - do not overwrite value", + attributes: func() pcommon.Map { + m := pcommon.NewMap() + m.PutStr("foo", "bar") + return m + }, + key: "foo", + val: "baz", + wantAttrs: func() pcommon.Map { + m := pcommon.NewMap() + m.PutStr("foo", "bar") + return m + }, + }, + { + name: "attribute present with empty value - set value", + attributes: func() pcommon.Map { + m := pcommon.NewMap() + m.PutStr("foo", "") + return m + }, + key: "foo", + val: "bar", + wantAttrs: func() pcommon.Map { + m := pcommon.NewMap() + m.PutStr("foo", "bar") + return m + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + attrs := tt.attributes() + setResourceAttribute(attrs, tt.key, tt.val) + require.Equal(t, tt.wantAttrs(), attrs) + }) + } +} diff --git a/src/processor/k8sattributesprocessor/testdata/config.yaml b/src/processor/k8sattributesprocessor/testdata/config.yaml index b939e64e..96b22503 100644 --- a/src/processor/k8sattributesprocessor/testdata/config.yaml +++ b/src/processor/k8sattributesprocessor/testdata/config.yaml @@ -289,7 +289,7 @@ swk8sattributes/too_many_sources: - from: connection name: ip -k8sattributes/deprecated-regex: +swk8sattributes/deprecated-regex: passthrough: false auth_type: "kubeConfig" extract: