From 01abae3da30ddfd77f653eb9ec56cd8cebd07bbf Mon Sep 17 00:00:00 2001 From: Michal Pecenka Date: Fri, 3 Jan 2025 10:28:43 +0100 Subject: [PATCH 1/3] collect provider specific information --- deploy/helm/events-collector-config.yaml | 34 +++++ ...events-collector-config-map_test.yaml.snap | 136 ++++++++++++++++++ src/cmd/components.go | 3 + src/cmd/go.mod | 12 +- src/cmd/go.sum | 28 ++-- 5 files changed, 200 insertions(+), 13 deletions(-) diff --git a/deploy/helm/events-collector-config.yaml b/deploy/helm/events-collector-config.yaml index 20f9bcbb..31264d25 100644 --- a/deploy/helm/events-collector-config.yaml +++ b/deploy/helm/events-collector-config.yaml @@ -234,6 +234,7 @@ processors: - key: sw.k8s.log.type value: event action: insert + resource/manifest: attributes: # Collector and Manifest version @@ -257,6 +258,38 @@ processors: - key: sw.k8s.log.type value: manifest action: insert + + resourcedetection/providers: + detectors: ["ec2","azure","openshift"] + timeout: 2s + override: false + azure: + resource_attributes: + azure.vm.scaleset.name: + enabled: false + azure.vm.size: + enabled: false + host.id: + enabled: false + host.name: + enabled: false + openshift: + resource_attributes: + k8s.cluster.name: + enabled: false + ec2: + resource_attributes: + cloud.availability_zone: + enabled: false + host.id: + enabled: false + host.image.id: + enabled: false + host.name: + enabled: false + host.type: + enabled: false + batch: {{ toYaml .Values.otel.events.batch | indent 4 }} swk8sattributes: @@ -327,6 +360,7 @@ service: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest + - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities {{- if not (and .Values.otel.events.enabled .Values.otel.manifests.enabled) }} diff --git a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap index 26c23917..601e5d1f 100644 --- a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap +++ b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap @@ -91,6 +91,39 @@ Custom events filter with new syntax: - action: insert key: sw.k8s.log.type value: manifest + resourcedetection/providers: + azure: + resource_attributes: + azure.vm.scaleset.name: + enabled: false + azure.vm.size: + enabled: false + host.id: + enabled: false + host.name: + enabled: false + detectors: + - ec2 + - azure + - openshift + ec2: + resource_attributes: + cloud.availability_zone: + enabled: false + host.id: + enabled: false + host.image.id: + enabled: false + host.name: + enabled: false + host.type: + enabled: false + openshift: + resource_attributes: + k8s.cluster.name: + enabled: false + override: false + timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -528,6 +561,7 @@ Custom events filter with new syntax: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest + - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -635,6 +669,39 @@ Custom events filter with old syntax: - action: insert key: sw.k8s.log.type value: manifest + resourcedetection/providers: + azure: + resource_attributes: + azure.vm.scaleset.name: + enabled: false + azure.vm.size: + enabled: false + host.id: + enabled: false + host.name: + enabled: false + detectors: + - ec2 + - azure + - openshift + ec2: + resource_attributes: + cloud.availability_zone: + enabled: false + host.id: + enabled: false + host.image.id: + enabled: false + host.name: + enabled: false + host.type: + enabled: false + openshift: + resource_attributes: + k8s.cluster.name: + enabled: false + override: false + timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -1072,6 +1139,7 @@ Custom events filter with old syntax: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest + - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -1172,6 +1240,39 @@ Events config should match snapshot when using default values: - action: insert key: sw.k8s.log.type value: manifest + resourcedetection/providers: + azure: + resource_attributes: + azure.vm.scaleset.name: + enabled: false + azure.vm.size: + enabled: false + host.id: + enabled: false + host.name: + enabled: false + detectors: + - ec2 + - azure + - openshift + ec2: + resource_attributes: + cloud.availability_zone: + enabled: false + host.id: + enabled: false + host.image.id: + enabled: false + host.name: + enabled: false + host.type: + enabled: false + openshift: + resource_attributes: + k8s.cluster.name: + enabled: false + override: false + timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -1608,6 +1709,7 @@ Events config should match snapshot when using default values: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest + - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -1708,6 +1810,39 @@ Events config should not contain manifest collection pipeline when disabled: - action: insert key: sw.k8s.log.type value: manifest + resourcedetection/providers: + azure: + resource_attributes: + azure.vm.scaleset.name: + enabled: false + azure.vm.size: + enabled: false + host.id: + enabled: false + host.name: + enabled: false + detectors: + - ec2 + - azure + - openshift + ec2: + resource_attributes: + cloud.availability_zone: + enabled: false + host.id: + enabled: false + host.image.id: + enabled: false + host.name: + enabled: false + host.type: + enabled: false + openshift: + resource_attributes: + k8s.cluster.name: + enabled: false + override: false + timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -2084,6 +2219,7 @@ Events config should not contain manifest collection pipeline when disabled: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest + - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - filter/k8s_collector_config_include diff --git a/src/cmd/components.go b/src/cmd/components.go index 9c7a83c5..385dc79d 100644 --- a/src/cmd/components.go +++ b/src/cmd/components.go @@ -25,6 +25,7 @@ import ( groupbyattrsprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor" metricsgenerationprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor" metricstransformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" + resourcedetectionprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" resourceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" transformprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" filelogreceiver "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver" @@ -117,6 +118,7 @@ func components() (otelcol.Factories, error) { filterprocessor.NewFactory(), attributesprocessor.NewFactory(), swk8sattributesprocessor.NewFactory(), + resourcedetectionprocessor.NewFactory(), ) if err != nil { return otelcol.Factories{}, err @@ -135,6 +137,7 @@ func components() (otelcol.Factories, error) { 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.Connectors, err = connector.MakeFactoryMap( forwardconnector.NewFactory(), diff --git a/src/cmd/go.mod b/src/cmd/go.mod index 25e8b2fb..752ca82d 100644 --- a/src/cmd/go.mod +++ b/src/cmd/go.mod @@ -27,6 +27,7 @@ require ( 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 @@ -70,7 +71,7 @@ require ( require ( cloud.google.com/go/auth v0.7.0 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect - cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.13.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect @@ -78,13 +79,15 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/alecthomas/participle/v2 v2.1.1 // indirect github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect github.com/antchfx/xmlquery v1.4.2 // indirect github.com/antchfx/xpath v1.3.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.54.19 // indirect + github.com/aws/aws-sdk-go v1.55.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -138,7 +141,7 @@ require ( 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/hashicorp/consul/api v1.29.2 // 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 github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -188,10 +191,12 @@ require ( 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 @@ -222,6 +227,7 @@ require ( github.com/solarwinds/swi-k8s-opentelemetry-collector/internal/k8sconfig v0.113.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 github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect diff --git a/src/cmd/go.sum b/src/cmd/go.sum index 533baa69..be307f8e 100644 --- a/src/cmd/go.sum +++ b/src/cmd/go.sum @@ -23,8 +23,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -67,11 +67,15 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 h1:3c8yed4lgqTt+oTQ+JNMDo+F4xprBf+O/il4ZC0nRLw= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0/go.mod h1:obipzmGjfSjam60XLwGfqUkJsfiheAl+TUjG+4yzyPM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= +github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= github.com/alecthomas/assert/v2 v2.3.0 h1:mAsH2wmvjsuvyBvAmCtm7zFsBlb8mIHx5ySLVdDZXL0= github.com/alecthomas/assert/v2 v2.3.0/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/participle/v2 v2.1.1 h1:hrjKESvSqGHzRb4yW1ciisFJ4p3MGYih6icjJvbsmV8= @@ -97,8 +101,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.54.19 h1:tyWV+07jagrNiCcGRzRhdtVjQs7Vy41NwsuOcl0IbVI= -github.com/aws/aws-sdk-go v1.54.19/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -330,10 +334,8 @@ github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc/go.mod h1:+JKpmjMGh 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/hashicorp/consul/api v1.29.2 h1:aYyRn8EdE2mSfG14S1+L9Qkjtz8RzmaWh6AcNGRNwPw= -github.com/hashicorp/consul/api v1.29.2/go.mod h1:0YObcaLNDSbtlgzIRtmRXI1ZkeuK0trCBxwZQ4MYnIk= -github.com/hashicorp/consul/proto-public v0.6.2 h1:+DA/3g/IiKlJZb88NBn0ZgXrxJp2NlvCZdEyl+qxvL0= -github.com/hashicorp/consul/proto-public v0.6.2/go.mod h1:cXXbOg74KBNGajC+o8RlA502Esf0R9prcoJgiOX/2Tg= +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= github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s= github.com/hashicorp/cronexpr v1.1.2 h1:wG/ZYIKT+RT3QkOdgYc+xsKWVRgnxJ1OJtjjy84fJ9A= @@ -547,6 +549,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.1 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= @@ -557,6 +561,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0. 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= @@ -591,6 +597,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgener 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= @@ -1328,8 +1336,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 51fb71851a9f47e1644538b04c7c34a389b749d1 Mon Sep 17 00:00:00 2001 From: Michal Pecenka Date: Fri, 3 Jan 2025 12:57:34 +0100 Subject: [PATCH 2/3] increasing image version --- build/docker/structure-test.yaml | 2 +- src/cmd/metadata/metadata.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/docker/structure-test.yaml b/build/docker/structure-test.yaml index 1b1882b6..c0380d9d 100644 --- a/build/docker/structure-test.yaml +++ b/build/docker/structure-test.yaml @@ -17,4 +17,4 @@ commandTests: - name: "swi-otelcol is working in the image" command: "/swi-otelcol" args: ["-v"] - expectedOutput: ["swi-k8s-opentelemetry-collector version 0.12.2"] + expectedOutput: ["swi-k8s-opentelemetry-collector version 0.12.3"] diff --git a/src/cmd/metadata/metadata.go b/src/cmd/metadata/metadata.go index a3cb6c39..85d26b06 100644 --- a/src/cmd/metadata/metadata.go +++ b/src/cmd/metadata/metadata.go @@ -3,5 +3,5 @@ package metadata var ( AppName = "swi-k8s-opentelemetry-collector" AppDescription = "SolarWinds distribution for OpenTelemetry" - AppVersion = "0.12.2" + AppVersion = "0.12.3" ) From 9a2c5ae2f4c5fb6c580b3504506fa7eb532cb4c2 Mon Sep 17 00:00:00 2001 From: Michal Pecenka Date: Fri, 3 Jan 2025 13:17:31 +0100 Subject: [PATCH 3/3] reverting helm changes --- deploy/helm/events-collector-config.yaml | 34 ----- ...events-collector-config-map_test.yaml.snap | 136 ------------------ 2 files changed, 170 deletions(-) diff --git a/deploy/helm/events-collector-config.yaml b/deploy/helm/events-collector-config.yaml index 31264d25..20f9bcbb 100644 --- a/deploy/helm/events-collector-config.yaml +++ b/deploy/helm/events-collector-config.yaml @@ -234,7 +234,6 @@ processors: - key: sw.k8s.log.type value: event action: insert - resource/manifest: attributes: # Collector and Manifest version @@ -258,38 +257,6 @@ processors: - key: sw.k8s.log.type value: manifest action: insert - - resourcedetection/providers: - detectors: ["ec2","azure","openshift"] - timeout: 2s - override: false - azure: - resource_attributes: - azure.vm.scaleset.name: - enabled: false - azure.vm.size: - enabled: false - host.id: - enabled: false - host.name: - enabled: false - openshift: - resource_attributes: - k8s.cluster.name: - enabled: false - ec2: - resource_attributes: - cloud.availability_zone: - enabled: false - host.id: - enabled: false - host.image.id: - enabled: false - host.name: - enabled: false - host.type: - enabled: false - batch: {{ toYaml .Values.otel.events.batch | indent 4 }} swk8sattributes: @@ -360,7 +327,6 @@ service: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest - - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities {{- if not (and .Values.otel.events.enabled .Values.otel.manifests.enabled) }} diff --git a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap index 601e5d1f..26c23917 100644 --- a/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap +++ b/deploy/helm/tests/__snapshot__/events-collector-config-map_test.yaml.snap @@ -91,39 +91,6 @@ Custom events filter with new syntax: - action: insert key: sw.k8s.log.type value: manifest - resourcedetection/providers: - azure: - resource_attributes: - azure.vm.scaleset.name: - enabled: false - azure.vm.size: - enabled: false - host.id: - enabled: false - host.name: - enabled: false - detectors: - - ec2 - - azure - - openshift - ec2: - resource_attributes: - cloud.availability_zone: - enabled: false - host.id: - enabled: false - host.image.id: - enabled: false - host.name: - enabled: false - host.type: - enabled: false - openshift: - resource_attributes: - k8s.cluster.name: - enabled: false - override: false - timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -561,7 +528,6 @@ Custom events filter with new syntax: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest - - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -669,39 +635,6 @@ Custom events filter with old syntax: - action: insert key: sw.k8s.log.type value: manifest - resourcedetection/providers: - azure: - resource_attributes: - azure.vm.scaleset.name: - enabled: false - azure.vm.size: - enabled: false - host.id: - enabled: false - host.name: - enabled: false - detectors: - - ec2 - - azure - - openshift - ec2: - resource_attributes: - cloud.availability_zone: - enabled: false - host.id: - enabled: false - host.image.id: - enabled: false - host.name: - enabled: false - host.type: - enabled: false - openshift: - resource_attributes: - k8s.cluster.name: - enabled: false - override: false - timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -1139,7 +1072,6 @@ Custom events filter with old syntax: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest - - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -1240,39 +1172,6 @@ Events config should match snapshot when using default values: - action: insert key: sw.k8s.log.type value: manifest - resourcedetection/providers: - azure: - resource_attributes: - azure.vm.scaleset.name: - enabled: false - azure.vm.size: - enabled: false - host.id: - enabled: false - host.name: - enabled: false - detectors: - - ec2 - - azure - - openshift - ec2: - resource_attributes: - cloud.availability_zone: - enabled: false - host.id: - enabled: false - host.image.id: - enabled: false - host.name: - enabled: false - host.type: - enabled: false - openshift: - resource_attributes: - k8s.cluster.name: - enabled: false - override: false - timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -1709,7 +1608,6 @@ Events config should match snapshot when using default values: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest - - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - transform/scope @@ -1810,39 +1708,6 @@ Events config should not contain manifest collection pipeline when disabled: - action: insert key: sw.k8s.log.type value: manifest - resourcedetection/providers: - azure: - resource_attributes: - azure.vm.scaleset.name: - enabled: false - azure.vm.size: - enabled: false - host.id: - enabled: false - host.name: - enabled: false - detectors: - - ec2 - - azure - - openshift - ec2: - resource_attributes: - cloud.availability_zone: - enabled: false - host.id: - enabled: false - host.image.id: - enabled: false - host.name: - enabled: false - host.type: - enabled: false - openshift: - resource_attributes: - k8s.cluster.name: - enabled: false - override: false - timeout: 2s swk8sattributes: auth_type: serviceAccount cronjob: @@ -2219,7 +2084,6 @@ Events config should not contain manifest collection pipeline when disabled: - transform/set_labels_and_annotations_for_entities - transform/stringify_body - resource/manifest - - resourcedetection/providers - swk8sattributes - transform/cleanup_attributes_for_nonexisting_entities - filter/k8s_collector_config_include