From 59ab491385eca6f9bf0cdb049d098387dc98b67c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:44:13 +0100 Subject: [PATCH 1/3] Update module github.com/google/cadvisor to v0.51.0 (#36639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/google/cadvisor](https://redirect.github.com/google/cadvisor) | `v0.49.1-0.20240628164550-89f779d86055` -> `v0.51.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgoogle%2fcadvisor/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgoogle%2fcadvisor/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgoogle%2fcadvisor/v0.49.1-0.20240628164550-89f779d86055/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgoogle%2fcadvisor/v0.49.1-0.20240628164550-89f779d86055/v0.51.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes
google/cadvisor (github.com/google/cadvisor) ### [`v0.51.0`](https://redirect.github.com/google/cadvisor/releases/tag/v0.51.0) [Compare Source](https://redirect.github.com/google/cadvisor/compare/v0.50.0...v0.51.0) #### What's Changed - address another nil ptr check in podmanFactory.CanHandleAndAccept() by [@​char8](https://redirect.github.com/char8) in [https://github.com/google/cadvisor/pull/3566](https://redirect.github.com/google/cadvisor/pull/3566) - sysfs: trim spaces in device hidden check by [@​clwluvw](https://redirect.github.com/clwluvw) in [https://github.com/google/cadvisor/pull/3522](https://redirect.github.com/google/cadvisor/pull/3522) - Avoid linting in Prow CI jobs by [@​dims](https://redirect.github.com/dims) in [https://github.com/google/cadvisor/pull/3608](https://redirect.github.com/google/cadvisor/pull/3608) - Drop unused setNetworkStats by [@​dims](https://redirect.github.com/dims) in [https://github.com/google/cadvisor/pull/3609](https://redirect.github.com/google/cadvisor/pull/3609) #### New Contributors - [@​char8](https://redirect.github.com/char8) made their first contribution in [https://github.com/google/cadvisor/pull/3566](https://redirect.github.com/google/cadvisor/pull/3566) - [@​clwluvw](https://redirect.github.com/clwluvw) made their first contribution in [https://github.com/google/cadvisor/pull/3522](https://redirect.github.com/google/cadvisor/pull/3522) **Full Changelog**: https://github.com/google/cadvisor/compare/v0.50.0...v0.51.0 Multi Arch Container Image: gcr.io/cadvisor/cadvisor:v0.51.0 Architecture Specific Container Images: gcr.io/cadvisor/cadvisor-arm:v0.51.0 gcr.io/cadvisor/cadvisor-arm64:v0.51.0 gcr.io/cadvisor/cadvisor-s390x:v0.51.0 gcr.io/cadvisor/cadvisor-amd64:v0.51.0 Binaries: SHA256 (./cadvisor-v0.51.0-linux-arm64) = 518f05a7aeb122be88ecb0fa3fb905aa0840bb029cb08de0e4b523b7e8aae1e1 SHA256 (./cadvisor-v0.51.0-linux-s390x) = 08f3fd69ac8c4b167b110994c3df711c51875ed21eb818172dfd3cc285e958cd SHA256 (./cadvisor-v0.51.0-linux-amd64) = cc3d2555f1eed948c5b3d448766107ba5ea90e9b5f8a06c60f010826fbb806a7 SHA256 (./cadvisor-v0.51.0-linux-arm) = 9df65d377f082a80c7f04b92badd16b141d8d3021e7c1f4929c5f89f95e8937b ### [`v0.50.0`](https://redirect.github.com/google/cadvisor/releases/tag/v0.50.0) [Compare Source](https://redirect.github.com/google/cadvisor/compare/v0.49.1...v0.50.0) #### What's Changed - Remove s390x support by [@​bobbypage](https://redirect.github.com/bobbypage) in [https://github.com/google/cadvisor/pull/3485](https://redirect.github.com/google/cadvisor/pull/3485) - build docker - add --provenance=false flag by [@​bobbypage](https://redirect.github.com/bobbypage) in [https://github.com/google/cadvisor/pull/3487](https://redirect.github.com/google/cadvisor/pull/3487) - chore: fix some typos in comments by [@​worrycare](https://redirect.github.com/worrycare) in [https://github.com/google/cadvisor/pull/3509](https://redirect.github.com/google/cadvisor/pull/3509) - Update version number in README.md quick start example by [@​narbux](https://redirect.github.com/narbux) in [https://github.com/google/cadvisor/pull/3510](https://redirect.github.com/google/cadvisor/pull/3510) - build(deps): bump github.com/docker/docker from 20.10.27+incompatible to 24.0.9+incompatible in /cmd by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/google/cadvisor/pull/3504](https://redirect.github.com/google/cadvisor/pull/3504) - build(deps): bump github.com/docker/docker from 20.10.27+incompatible to 24.0.9+incompatible by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/google/cadvisor/pull/3505](https://redirect.github.com/google/cadvisor/pull/3505) - build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0 in /cmd by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/google/cadvisor/pull/3499](https://redirect.github.com/google/cadvisor/pull/3499) - build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.33.0 by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/google/cadvisor/pull/3498](https://redirect.github.com/google/cadvisor/pull/3498) - fix type of C.malloc in cgo by [@​cwangVT](https://redirect.github.com/cwangVT) in [https://github.com/google/cadvisor/pull/3480](https://redirect.github.com/google/cadvisor/pull/3480) - Remove non-existent psi_avg and psi_total from the docs by [@​bobrik](https://redirect.github.com/bobrik) in [https://github.com/google/cadvisor/pull/3501](https://redirect.github.com/google/cadvisor/pull/3501) - fix broken link to docker document by [@​mghahari](https://redirect.github.com/mghahari) in [https://github.com/google/cadvisor/pull/3496](https://redirect.github.com/google/cadvisor/pull/3496) - Using bookworm images by [@​iwankgb](https://redirect.github.com/iwankgb) in [https://github.com/google/cadvisor/pull/3540](https://redirect.github.com/google/cadvisor/pull/3540) - Update dependencies to latest by [@​dims](https://redirect.github.com/dims) in [https://github.com/google/cadvisor/pull/3542](https://redirect.github.com/google/cadvisor/pull/3542) - Add s390/s390x CPU topology by [@​madeelibm](https://redirect.github.com/madeelibm) in [https://github.com/google/cadvisor/pull/3516](https://redirect.github.com/google/cadvisor/pull/3516) - Revert to docker/docker 26.1.4 by [@​skitt](https://redirect.github.com/skitt) in [https://github.com/google/cadvisor/pull/3553](https://redirect.github.com/google/cadvisor/pull/3553) - doc: fix TCPRcvCollapsed comment by [@​0x0034](https://redirect.github.com/0x0034) in [https://github.com/google/cadvisor/pull/3550](https://redirect.github.com/google/cadvisor/pull/3550) - CI: update busybox image to fix CI by [@​zhangguanzhang](https://redirect.github.com/zhangguanzhang) in [https://github.com/google/cadvisor/pull/3559](https://redirect.github.com/google/cadvisor/pull/3559) - Expose Podman version info by [@​riyad](https://redirect.github.com/riyad) in [https://github.com/google/cadvisor/pull/3552](https://redirect.github.com/google/cadvisor/pull/3552) - Add s390x support again by [@​madeelibm](https://redirect.github.com/madeelibm) in [https://github.com/google/cadvisor/pull/3521](https://redirect.github.com/google/cadvisor/pull/3521) - feat: add metrics for total_active_file and total_inactive_file memory by [@​jrcichra](https://redirect.github.com/jrcichra) in [https://github.com/google/cadvisor/pull/3445](https://redirect.github.com/google/cadvisor/pull/3445) - Add uninterruptible metric load d by [@​j4ckstraw](https://redirect.github.com/j4ckstraw) in [https://github.com/google/cadvisor/pull/3555](https://redirect.github.com/google/cadvisor/pull/3555) - Avoiding nil pointer in podmanFactory.CanHandleAndAccept() by [@​iwankgb](https://redirect.github.com/iwankgb) in [https://github.com/google/cadvisor/pull/3562](https://redirect.github.com/google/cadvisor/pull/3562) - Migrate to AWS Go SDK v2 by [@​skitt](https://redirect.github.com/skitt) in [https://github.com/google/cadvisor/pull/3201](https://redirect.github.com/google/cadvisor/pull/3201) - Fix kubelet stuck issue due to hung fs [#​125298](https://redirect.github.com/google/cadvisor/issues/125298) by [@​pragvija](https://redirect.github.com/pragvija) in [https://github.com/google/cadvisor/pull/3541](https://redirect.github.com/google/cadvisor/pull/3541) - build(deps): bump the go_modules group across 2 directories with 1 update by [@​dependabot](https://redirect.github.com/dependabot) in [https://github.com/google/cadvisor/pull/3564](https://redirect.github.com/google/cadvisor/pull/3564) - use containerd/containerd/api module by [@​akhilerm](https://redirect.github.com/akhilerm) in [https://github.com/google/cadvisor/pull/3526](https://redirect.github.com/google/cadvisor/pull/3526) - Revert "reduce_logs_for_kubelet_use_crio" by [@​uablrek](https://redirect.github.com/uablrek) in [https://github.com/google/cadvisor/pull/3565](https://redirect.github.com/google/cadvisor/pull/3565) #### New Contributors - [@​worrycare](https://redirect.github.com/worrycare) made their first contribution in [https://github.com/google/cadvisor/pull/3509](https://redirect.github.com/google/cadvisor/pull/3509) - [@​narbux](https://redirect.github.com/narbux) made their first contribution in [https://github.com/google/cadvisor/pull/3510](https://redirect.github.com/google/cadvisor/pull/3510) - [@​cwangVT](https://redirect.github.com/cwangVT) made their first contribution in [https://github.com/google/cadvisor/pull/3480](https://redirect.github.com/google/cadvisor/pull/3480) - [@​mghahari](https://redirect.github.com/mghahari) made their first contribution in [https://github.com/google/cadvisor/pull/3496](https://redirect.github.com/google/cadvisor/pull/3496) - [@​madeelibm](https://redirect.github.com/madeelibm) made their first contribution in [https://github.com/google/cadvisor/pull/3516](https://redirect.github.com/google/cadvisor/pull/3516) - [@​0x0034](https://redirect.github.com/0x0034) made their first contribution in [https://github.com/google/cadvisor/pull/3550](https://redirect.github.com/google/cadvisor/pull/3550) - [@​zhangguanzhang](https://redirect.github.com/zhangguanzhang) made their first contribution in [https://github.com/google/cadvisor/pull/3559](https://redirect.github.com/google/cadvisor/pull/3559) - [@​riyad](https://redirect.github.com/riyad) made their first contribution in [https://github.com/google/cadvisor/pull/3552](https://redirect.github.com/google/cadvisor/pull/3552) - [@​jrcichra](https://redirect.github.com/jrcichra) made their first contribution in [https://github.com/google/cadvisor/pull/3445](https://redirect.github.com/google/cadvisor/pull/3445) - [@​j4ckstraw](https://redirect.github.com/j4ckstraw) made their first contribution in [https://github.com/google/cadvisor/pull/3555](https://redirect.github.com/google/cadvisor/pull/3555) - [@​pragvija](https://redirect.github.com/pragvija) made their first contribution in [https://github.com/google/cadvisor/pull/3541](https://redirect.github.com/google/cadvisor/pull/3541) - [@​akhilerm](https://redirect.github.com/akhilerm) made their first contribution in [https://github.com/google/cadvisor/pull/3526](https://redirect.github.com/google/cadvisor/pull/3526) - [@​uablrek](https://redirect.github.com/uablrek) made their first contribution in [https://github.com/google/cadvisor/pull/3565](https://redirect.github.com/google/cadvisor/pull/3565) **Full Changelog**: https://github.com/google/cadvisor/compare/v0.49.0...v0.50.0 Multi Arch Container Image: gcr.io/cadvisor/cadvisor:v0.50.0 Architecture Specific Container Images: gcr.io/cadvisor/cadvisor-arm:v0.50.0 gcr.io/cadvisor/cadvisor-arm64:v0.50.0 gcr.io/cadvisor/cadvisor-s390x:v0.50.0 gcr.io/cadvisor/cadvisor-amd64:v0.50.0 Binaries: SHA256 (./cadvisor-v0.50.0-linux-arm64) = 37c998d54dc0e8b1635d9be4c0ab15dfc3123aa41805ad0bd909c896d5a1a89b SHA256 (./cadvisor-v0.50.0-linux-amd64) = c63976400ca980b4b34bd074ef93c5321650050e45e6dc4d0cb1baf7dc772639 SHA256 (./cadvisor-v0.50.0-linux-s390x) = 0886ad85af4c8940a6f315ab814de988538891d2e04719cbb2df343181b55760 SHA256 (./cadvisor-v0.50.0-linux-arm) = c6d72fe6d2004bb2ff1f7f2462692eed36295349a0f4dfd6dab9efae10e257f1
--- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> --- receiver/awscontainerinsightreceiver/go.mod | 17 +++------ receiver/awscontainerinsightreceiver/go.sum | 42 ++++++--------------- 2 files changed, 18 insertions(+), 41 deletions(-) diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index b838816aff68..352c8188d160 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 - github.com/google/cadvisor v0.49.1-0.20240628164550-89f779d86055 + github.com/google/cadvisor v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.115.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.115.0 @@ -35,10 +35,11 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect github.com/cilium/ebpf v0.7.0 // indirect - github.com/containerd/console v1.0.3 // indirect - github.com/containerd/ttrpc v1.2.4 // indirect + github.com/containerd/containerd/api v1.7.19 // indirect + github.com/containerd/errdefs v0.1.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/ttrpc v1.2.5 // indirect github.com/coreos/go-systemd/v22 v22.3.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -87,14 +88,12 @@ require ( github.com/moby/sys/mountinfo v0.7.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mrunalp/fileutils v0.5.1 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.115.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.14 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect - github.com/opencontainers/selinux v1.10.0 // indirect github.com/openshift/api v3.9.0+incompatible // indirect github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect @@ -104,15 +103,11 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.59.1 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect - github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 // indirect - github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect github.com/x448/float16 v0.8.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/client v1.21.1-0.20241206185113-3f3e208e71b8 // indirect diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index 9143a5717e52..432814b6a8f2 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -45,22 +45,22 @@ github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2y github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA= +github.com/containerd/containerd/api v1.7.19/go.mod h1:fwGavl3LNwAV5ilJ0sbrABL44AQxmNjDRcwheXDb6Ig= +github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= +github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo= -github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU= +github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsPEmzLso= +github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -162,15 +162,14 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cadvisor v0.49.1-0.20240628164550-89f779d86055 h1:LH//TOiNPpCn3a48Flz5sNUmuMW5V/sTKheuXAPowUA= -github.com/google/cadvisor v0.49.1-0.20240628164550-89f779d86055/go.mod h1:koGHrZgL6RdZ29g/iXWT4kUIawssUi88XCYDlyPt5RI= +github.com/google/cadvisor v0.51.0 h1:BspqSPdZoLKrnvuZNOvM/KiJ/A+RdixwagN20n+2H8k= +github.com/google/cadvisor v0.51.0/go.mod h1:czGE/c/P/i0QFpVNKTFrIEzord9Y10YfpwuaSWXELc0= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -180,7 +179,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= @@ -281,8 +279,6 @@ 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/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q= -github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -300,14 +296,12 @@ 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/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.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/openshift/api v0.0.0-20180801171038-322a19404e37 h1:05irGU4HK4IauGGDbsk+ZHrm1wOzMLYjMlfaiqMrBYc= github.com/openshift/api v0.0.0-20180801171038-322a19404e37/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= @@ -364,16 +358,10 @@ 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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= 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= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0NllBLdjWoD1nDfaqu98YMv+OneaKc8sPOA= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= 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.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -550,23 +538,19 @@ golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -693,8 +677,6 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 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= From 8da4542aaaaf8d34a416a05c84ba57588d8bc2b8 Mon Sep 17 00:00:00 2001 From: Jade Guiton Date: Tue, 10 Dec 2024 11:59:28 +0100 Subject: [PATCH 2/3] [chore][exporter/datadog] Only start `hostmetadata.Reporter` if `host_metadata.enabled` (#36669) #### Description This PR avoids creating an `inframetadata.Reporter` and starting the metadata-sending goroutine when `host_metadata.enabled` is `false`, and removes some code that was used to work around the previous behavior. See tracking issue for context. When `enabled` is `false`, we leave the `exporter.metadataReporter` field as `nil`. The parts of the code accessing this field were already gated behind `enabled: true`, or `only_metadata: true` (which, in a valid config, implies `enabled: false`), so it should not cause issues. However, tests that modify the config after the exporter is created, or which manually create invalid `Config` structs may encounter segfaults. I assumed we do not mind segfaults in cases of incorrect internal use, and fixed the one test that was failing because of this. #### Link to tracking issue Fixes #36522 --- exporter/datadogexporter/factory.go | 36 ++++++++++++------- .../datadogexporter/logs_exporter_test.go | 6 ---- .../datadogexporter/metrics_exporter_test.go | 9 ++--- .../datadogexporter/traces_exporter_test.go | 15 +------- 4 files changed, 30 insertions(+), 36 deletions(-) diff --git a/exporter/datadogexporter/factory.go b/exporter/datadogexporter/factory.go index 3ba017623954..5726d889d403 100644 --- a/exporter/datadogexporter/factory.go +++ b/exporter/datadogexporter/factory.go @@ -270,10 +270,14 @@ func (f *factory) createMetricsExporter( statsv := set.BuildInfo.Command + set.BuildInfo.Version f.consumeStatsPayload(ctx, &wg, statsIn, statsWriter, statsv, acfg.AgentVersion, set.Logger) pcfg := newMetadataConfigfromConfig(cfg) - metadataReporter, err := f.Reporter(set, pcfg) - if err != nil { - cancel() - return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + // Don't start a `Reporter` if host metadata is disabled. + var metadataReporter *inframetadata.Reporter + if cfg.HostMetadata.Enabled { + metadataReporter, err = f.Reporter(set, pcfg) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + } } if cfg.OnlyMetadata { @@ -375,10 +379,14 @@ func (f *factory) createTracesExporter( } pcfg := newMetadataConfigfromConfig(cfg) - metadataReporter, err := f.Reporter(set, pcfg) - if err != nil { - cancel() - return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + // Don't start a `Reporter` if host metadata is disabled. + var metadataReporter *inframetadata.Reporter + if cfg.HostMetadata.Enabled { + metadataReporter, err = f.Reporter(set, pcfg) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + } } if cfg.OnlyMetadata { @@ -463,10 +471,14 @@ func (f *factory) createLogsExporter( // cancel() runs on shutdown pcfg := newMetadataConfigfromConfig(cfg) - metadataReporter, err := f.Reporter(set, pcfg) - if err != nil { - cancel() - return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + // Don't start a `Reporter` if host metadata is disabled. + var metadataReporter *inframetadata.Reporter + if cfg.HostMetadata.Enabled { + metadataReporter, err = f.Reporter(set, pcfg) + if err != nil { + cancel() + return nil, fmt.Errorf("failed to build host metadata reporter: %w", err) + } } attributesTranslator, err := f.AttributesTranslator(set.TelemetrySettings) diff --git a/exporter/datadogexporter/logs_exporter_test.go b/exporter/datadogexporter/logs_exporter_test.go index a2837353def9..941561890853 100644 --- a/exporter/datadogexporter/logs_exporter_test.go +++ b/exporter/datadogexporter/logs_exporter_test.go @@ -230,9 +230,6 @@ func TestLogsExporter(t *testing.T) { Endpoint: server.URL, }, }, - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, } params := exportertest.NewNopSettings() @@ -598,9 +595,6 @@ func TestLogsAgentExporter(t *testing.T) { CompressionLevel: 6, BatchWait: 1, }, - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, } params := exportertest.NewNopSettings() f := NewFactory() diff --git a/exporter/datadogexporter/metrics_exporter_test.go b/exporter/datadogexporter/metrics_exporter_test.go index 7d973171c850..95935fd053a4 100644 --- a/exporter/datadogexporter/metrics_exporter_test.go +++ b/exporter/datadogexporter/metrics_exporter_test.go @@ -59,10 +59,13 @@ func TestNewExporter(t *testing.T) { }, }, HostMetadata: HostMetadataConfig{ + Enabled: true, ReporterPeriod: 30 * time.Minute, + HostnameSource: HostnameSourceFirstResource, }, } cfg.HostMetadata.SetSourceTimeout(50 * time.Millisecond) + params := exportertest.NewNopSettings() f := NewFactory() @@ -76,8 +79,6 @@ func TestNewExporter(t *testing.T) { require.NoError(t, err) assert.Empty(t, server.MetadataChan) - cfg.HostMetadata.Enabled = true - cfg.HostMetadata.HostnameSource = HostnameSourceFirstResource testMetrics = pmetric.NewMetrics() testutil.TestMetrics.CopyTo(testMetrics) err = exp.ConsumeMetrics(context.Background(), testMetrics) @@ -440,7 +441,9 @@ func TestNewExporter_Zorkian(t *testing.T) { }, }, HostMetadata: HostMetadataConfig{ + Enabled: true, ReporterPeriod: 30 * time.Minute, + HostnameSource: HostnameSourceFirstResource, }, } params := exportertest.NewNopSettings() @@ -456,8 +459,6 @@ func TestNewExporter_Zorkian(t *testing.T) { require.NoError(t, err) assert.Empty(t, server.MetadataChan) - cfg.HostMetadata.Enabled = true - cfg.HostMetadata.HostnameSource = HostnameSourceFirstResource testMetrics = pmetric.NewMetrics() testutil.TestMetrics.CopyTo(testMetrics) err = exp.ConsumeMetrics(context.Background(), testMetrics) diff --git a/exporter/datadogexporter/traces_exporter_test.go b/exporter/datadogexporter/traces_exporter_test.go index 68aff8b3e1ea..54e4aaf73e4e 100644 --- a/exporter/datadogexporter/traces_exporter_test.go +++ b/exporter/datadogexporter/traces_exporter_test.go @@ -145,9 +145,6 @@ func TestTracesSource(t *testing.T) { IgnoreResources: []string{}, }, }, - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, } assert := assert.New(t) @@ -270,9 +267,6 @@ func TestTraceExporter(t *testing.T) { }, TraceBuffer: 2, }, - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, } cfg.Traces.SetFlushInterval(0.1) @@ -298,11 +292,7 @@ func TestNewTracesExporter(t *testing.T) { metricsServer := testutil.DatadogServerMock() defer metricsServer.Close() - cfg := &Config{ - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, - } + cfg := &Config{} cfg.API.Key = "ddog_32_characters_long_api_key1" cfg.Metrics.TCPAddrConfig.Endpoint = metricsServer.URL params := exportertest.NewNopSettings() @@ -368,9 +358,6 @@ func TestPushTraceData_NewEnvConvention(t *testing.T) { Traces: TracesConfig{ TCPAddrConfig: confignet.TCPAddrConfig{Endpoint: server.URL}, }, - HostMetadata: HostMetadataConfig{ - ReporterPeriod: 30 * time.Minute, - }, } cfg.Traces.SetFlushInterval(0.1) From adef54ee022ddd503bf78afdfb2a01b599853579 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Tue, 10 Dec 2024 06:11:18 -0500 Subject: [PATCH 3/3] [connector, exporter/datadog] Enable compute_stats_by_span_kind and peer_tags_aggregation by default (#35969) #### Description Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default --------- Co-authored-by: Pablo Baeyens --- .chloggen/dd-conn-peer-tags.yaml | 27 +++++++++++++++++++ .chloggen/dd-exp-peer-tags.yaml | 27 +++++++++++++++++++ connector/datadogconnector/factory.go | 5 +++- connector/datadogconnector/factory_test.go | 5 +++- .../integration_test_config.yaml | 2 -- pkg/datadog/config/config.go | 5 +++- pkg/datadog/config/config_test.go | 23 +++++++++++++--- pkg/datadog/config/config_warnings_test.go | 2 +- 8 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 .chloggen/dd-conn-peer-tags.yaml create mode 100644 .chloggen/dd-exp-peer-tags.yaml diff --git a/.chloggen/dd-conn-peer-tags.yaml b/.chloggen/dd-conn-peer-tags.yaml new file mode 100644 index 000000000000..2df3ee8da4a1 --- /dev/null +++ b/.chloggen/dd-conn-peer-tags.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: datadogconnector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35969] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: "This enables Datadog APM stats on peer tags by default and is a backwards-compatible change. Read more on https://docs.datadoghq.com/tracing/guide/inferred-service-opt-in/." + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/dd-exp-peer-tags.yaml b/.chloggen/dd-exp-peer-tags.yaml new file mode 100644 index 000000000000..55fe8d5b5999 --- /dev/null +++ b/.chloggen/dd-exp-peer-tags.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: datadogexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Flip configs `traces::compute_stats_by_span_kind`, `traces::peer_tags_aggregation` and `traces::peer_service_aggregation` to true by default" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35969] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: "This enables Datadog APM stats on peer tags by default and is a backwards-compatible change. Read more on https://docs.datadoghq.com/tracing/guide/inferred-service-opt-in/." + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/connector/datadogconnector/factory.go b/connector/datadogconnector/factory.go index f5f4b95a7ff2..8cd5781f8d00 100644 --- a/connector/datadogconnector/factory.go +++ b/connector/datadogconnector/factory.go @@ -45,7 +45,10 @@ func createDefaultConfig() component.Config { return &Config{ Traces: TracesConfig{ TracesConfig: datadogconfig.TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, TraceBuffer: 1000, diff --git a/connector/datadogconnector/factory_test.go b/connector/datadogconnector/factory_test.go index f92056baa295..bce1dadd9040 100644 --- a/connector/datadogconnector/factory_test.go +++ b/connector/datadogconnector/factory_test.go @@ -21,7 +21,10 @@ func TestCreateDefaultConfig(t *testing.T) { &Config{ Traces: TracesConfig{ TracesConfig: datadogconfig.TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, TraceBuffer: 1000, BucketInterval: 10 * time.Second, diff --git a/exporter/datadogexporter/integrationtest/integration_test_config.yaml b/exporter/datadogexporter/integrationtest/integration_test_config.yaml index dff2f35340a9..c32bf27da49e 100644 --- a/exporter/datadogexporter/integrationtest/integration_test_config.yaml +++ b/exporter/datadogexporter/integrationtest/integration_test_config.yaml @@ -21,8 +21,6 @@ processors: connectors: datadog/connector: traces: - compute_stats_by_span_kind: true - peer_tags_aggregation: true peer_tags: ["extra_peer_tag"] exporters: diff --git a/pkg/datadog/config/config.go b/pkg/datadog/config/config.go index 65133187c5b3..6171ca13cdb8 100644 --- a/pkg/datadog/config/config.go +++ b/pkg/datadog/config/config.go @@ -340,7 +340,10 @@ func CreateDefaultConfig() component.Config { Endpoint: "https://trace.agent.datadoghq.com", }, TracesConfig: TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, }, diff --git a/pkg/datadog/config/config_test.go b/pkg/datadog/config/config_test.go index 11c0d2db2bb2..a5db98302203 100644 --- a/pkg/datadog/config/config_test.go +++ b/pkg/datadog/config/config_test.go @@ -440,7 +440,10 @@ func TestCreateDefaultConfig(t *testing.T) { Endpoint: "https://trace.agent.datadoghq.com", }, TracesConfig: TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, }, Logs: LogsConfig{ @@ -510,7 +513,10 @@ func TestLoadConfig(t *testing.T) { Endpoint: "https://trace.agent.datadoghq.com", }, TracesConfig: TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, }, Logs: LogsConfig{ @@ -571,6 +577,9 @@ func TestLoadConfig(t *testing.T) { }, SpanNameAsResourceName: true, IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, TraceBuffer: 10, }, @@ -630,7 +639,10 @@ func TestLoadConfig(t *testing.T) { "old_name3": "new_name3", "old_name4": "new_name4", }, - IgnoreResources: []string{}, + IgnoreResources: []string{}, + PeerServiceAggregation: true, + PeerTagsAggregation: true, + ComputeStatsBySpanKind: true, }, }, Logs: LogsConfig{ @@ -684,7 +696,10 @@ func TestLoadConfig(t *testing.T) { Endpoint: "https://trace.agent.datadoghq.com", }, TracesConfig: TracesConfig{ - IgnoreResources: []string{}, + IgnoreResources: []string{}, + ComputeStatsBySpanKind: true, + PeerServiceAggregation: true, + PeerTagsAggregation: true, }, }, Logs: LogsConfig{ diff --git a/pkg/datadog/config/config_warnings_test.go b/pkg/datadog/config/config_warnings_test.go index 976ccdd5f45d..402f7850a014 100644 --- a/pkg/datadog/config/config_warnings_test.go +++ b/pkg/datadog/config/config_warnings_test.go @@ -137,7 +137,7 @@ func TestPeerTags(t *testing.T) { { name: "traces::peer_service_aggregation and traces::peer_tags_aggregation unset", cfgMap: confmap.New(), - expectedPeerTagsValue: false, + expectedPeerTagsValue: true, }, { name: "traces::peer_tags_aggregation set",