From 02c934be746729d3068be9cd5e8343318fdba5f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 16:04:45 +0100 Subject: [PATCH 1/2] build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity (#42690) Bumps [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go) from 1.7.0 to 1.8.2. - [Release notes](https://github.com/Azure/azure-sdk-for-go/releases) - [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md) - [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.7.0...sdk/azidentity/v1.8.2) --- updated-dependencies: - dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- NOTICE.txt | 44 ++++++++++++++++++++++---------------------- go.mod | 18 +++++++++--------- go.sum | 44 ++++++++++++++++++++++---------------------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 069f419fce6e..1549d89c2703 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1742,11 +1742,11 @@ SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/Azure/azure-sdk-for-go/sdk/azcore -Version: v1.16.0 +Version: v1.17.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azcore@v1.16.0/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azcore@v1.17.0/LICENSE.txt: MIT License @@ -1773,11 +1773,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/Azure/azure-sdk-for-go/sdk/azidentity -Version: v1.8.0 +Version: v1.8.2 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity@v1.8.0/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity@v1.8.2/LICENSE.txt: MIT License @@ -27220,11 +27220,11 @@ THE SOFTWARE. -------------------------------------------------------------------------------- Dependency : golang.org/x/crypto -Version: v0.31.0 +Version: v0.33.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.31.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.33.0/LICENSE: Copyright 2009 The Go Authors. @@ -27294,11 +27294,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/net -Version: v0.33.0 +Version: v0.35.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.33.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.35.0/LICENSE: Copyright 2009 The Go Authors. @@ -27368,11 +27368,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/sync -Version: v0.10.0 +Version: v0.11.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.10.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.11.0/LICENSE: Copyright 2009 The Go Authors. @@ -27405,11 +27405,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/sys -Version: v0.28.0 +Version: v0.30.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.28.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.30.0/LICENSE: Copyright 2009 The Go Authors. @@ -27442,11 +27442,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/term -Version: v0.27.0 +Version: v0.29.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.27.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.29.0/LICENSE: Copyright 2009 The Go Authors. @@ -27479,11 +27479,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- Dependency : golang.org/x/text -Version: v0.21.0 +Version: v0.22.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.21.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.22.0/LICENSE: Copyright 2009 The Go Authors. @@ -32575,11 +32575,11 @@ Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-pipeline-g -------------------------------------------------------------------------------- Dependency : github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache -Version: v0.3.0 +Version: v0.3.2 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity/cache@v0.3.0/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/!azure/azure-sdk-for-go/sdk/azidentity/cache@v0.3.2/LICENSE.txt: MIT License @@ -34551,11 +34551,11 @@ Contents of probable licence file $GOMODCACHE/github.com/!azure!a!d/microsoft-au -------------------------------------------------------------------------------- Dependency : github.com/AzureAD/microsoft-authentication-library-for-go -Version: v1.3.2 +Version: v1.3.3 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/!azure!a!d/microsoft-authentication-library-for-go@v1.3.2/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/!azure!a!d/microsoft-authentication-library-for-go@v1.3.3/LICENSE: MIT License @@ -57014,11 +57014,11 @@ Contents of probable licence file $GOMODCACHE/github.com/prometheus/client_golan -------------------------------------------------------------------------------- Dependency : github.com/redis/go-redis/v9 -Version: v9.6.1 +Version: v9.7.0 Licence type (autodetected): BSD-2-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/redis/go-redis/v9@v9.6.1/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/redis/go-redis/v9@v9.7.0/LICENSE: Copyright (c) 2013 The github.com/redis/go-redis Authors. All rights reserved. diff --git a/go.mod b/go.mod index 4f39957943c4..4ff7162dbf14 100644 --- a/go.mod +++ b/go.mod @@ -126,13 +126,13 @@ require ( go.etcd.io/bbolt v1.3.10 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.31.0 + golang.org/x/crypto v0.33.0 golang.org/x/mod v0.21.0 - golang.org/x/net v0.33.0 + golang.org/x/net v0.35.0 golang.org/x/oauth2 v0.24.0 - golang.org/x/sync v0.10.0 - golang.org/x/sys v0.28.0 - golang.org/x/text v0.21.0 + golang.org/x/sync v0.11.0 + golang.org/x/sys v0.30.0 + golang.org/x/text v0.22.0 golang.org/x/time v0.8.0 golang.org/x/tools v0.25.0 google.golang.org/api v0.214.0 @@ -153,8 +153,8 @@ require ( cloud.google.com/go v0.116.0 cloud.google.com/go/compute v1.29.0 cloud.google.com/go/redis v1.17.2 - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 v4.8.0 @@ -229,7 +229,7 @@ require ( go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/receiver v0.114.0 go.uber.org/mock v0.5.0 - golang.org/x/term v0.27.0 + golang.org/x/term v0.29.0 google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) @@ -253,7 +253,7 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect diff --git a/go.sum b/go.sum index 3cd1c865a183..87da6b686820 100644 --- a/go.sum +++ b/go.sum @@ -54,12 +54,12 @@ github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVt github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 h1:JZg6HRh6W6U4OLl6lk7BZ7BLisIzM9dG1R50zUk9C/M= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0/go.mod h1:YL1xnZ6QejvQHWJrX/AvhFl4WW4rqHVoKspWNVwFk0M= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 h1:B/dfvscEQtew9dVuoxqxrUKKv8Ih2f55PydknDamU+g= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0/go.mod h1:fiPSssYvltE08HJchL04dOy+RD4hgrjph0cwGGMntdI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0 h1:+m0M/LFxN43KvULkDNfdXOgrjtg6UYJPFBJyuEcRCAw= -github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.0/go.mod h1:PwOyop78lveYMRs6oCxjiVyBdyCgIYH6XHIVZO9/SFQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0 h1:g0EZJwz7xkXQiZAI5xi9f3WWFYBlX1CPTrR+NDToRkQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.17.0/go.mod h1:XCW7KnZet0Opnr7HccfUw1PLc4CjHqpcaxW8DHklNkQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2 h1:F0gBpfdPLGsw+nsgk6aqqkZS1jiixa5WwFe3fk/T3Ys= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.2/go.mod h1:SqINnQ9lVVdRlyC8cd1lCI0SdX4n2paeABd2K8ggfnE= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2 h1:yz1bePFlP5Vws5+8ez6T3HWXPmwOK7Yvq8QxDBD3SKY= +github.com/Azure/azure-sdk-for-go/sdk/azidentity/cache v0.3.2/go.mod h1:Pa9ZNPuoNu/GztvBSKk9J1cDJW6vk/n0zLtV4mgd8N8= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 h1:ywEEhmNahHBihViHepv3xPBn1663uRv2t2q/ESv9seY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0/go.mod h1:iZDifYGJTIgIIkYRNWPENUnqx6bJ2xnSDFI2tjwZNuY= github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs v1.3.0 h1:skbmKp8umb8jMxl4A4CwvYyfCblujU00XUB/ytUjEac= @@ -121,8 +121,8 @@ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+ github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM= github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1/go.mod h1:tCcJZ0uHAmvjsVYzEFivsRTN00oz5BEsRgQHu5JZ9WE= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2 h1:kYRSnvJju5gYVyhkij+RTJ/VR6QIUaCfWeaFm2ycsjQ= -github.com/AzureAD/microsoft-authentication-library-for-go v1.3.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 h1:H5xDQaE3XowWfhZRUpnfC+rGZMEVoSiji+b+/HFAPU4= +github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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= @@ -863,8 +863,8 @@ github.com/prometheus/prometheus v0.54.1 h1:vKuwQNjnYN2/mDoWfHXDhAsz/68q/dQDb+Yb github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx98BzeCR99991NY= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/redis/go-redis/v9 v9.6.1 h1:HHDteefn6ZkTtY5fGUE8tj8uy85AHk6zP7CpzIAM0y4= -github.com/redis/go-redis/v9 v9.6.1/go.mod h1:0C0c6ycQsdpVNQpxb1njEQIqkx5UcsM8FJCQLgE9+RA= +github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= +github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= @@ -1164,8 +1164,8 @@ golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= @@ -1211,8 +1211,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= +golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= @@ -1228,8 +1228,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1273,8 +1273,8 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -1284,8 +1284,8 @@ golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -1297,8 +1297,8 @@ golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= From 61aadfeb6b440b0e32c6a3e344f4da3d6a744590 Mon Sep 17 00:00:00 2001 From: Vihas Makwana <121151420+VihasMakwana@users.noreply.github.com> Date: Tue, 4 Mar 2025 21:18:04 +0530 Subject: [PATCH 2/2] [chore] - Introduce a helper to setup registry (#42943) * chore: introduce a helper * use "libbeat" registry * chore: move registry to b.Info --- libbeat/beat/info.go | 3 + libbeat/cmd/instance/beat.go | 108 +++++++++++++++++++---------------- 2 files changed, 62 insertions(+), 49 deletions(-) diff --git a/libbeat/beat/info.go b/libbeat/beat/info.go index 5aac06d7b893..784ebd5e7876 100644 --- a/libbeat/beat/info.go +++ b/libbeat/beat/info.go @@ -45,6 +45,9 @@ type Info struct { Monitoring struct { DefaultUsername string // The default username to be used to connect to Elasticsearch Monitoring Namespace *monitoring.Namespace // a monitor namespace that is unique per beat instance + + StateRegistry *monitoring.Registry + InfoRegistry *monitoring.Registry } LogConsumer consumer.Logs // otel log consumer UseDefaultProcessors bool // Whether to use the default processors diff --git a/libbeat/cmd/instance/beat.go b/libbeat/cmd/instance/beat.go index 99bf7cbd2c99..876e5aa45bd7 100644 --- a/libbeat/cmd/instance/beat.go +++ b/libbeat/cmd/instance/beat.go @@ -315,6 +315,8 @@ func NewBeatReceiver(settings Settings, receiverConfig map[string]interface{}, u b.Beat.Info.Monitoring.Namespace = monitoring.GetNamespace(b.Info.Beat + "-" + b.Info.ID.String()) + b.SetupRegistry() + instrumentation, err := instrumentation.New(cfg, b.Info.Beat, b.Info.Version) if err != nil { return nil, fmt.Errorf("error setting up instrumentation: %w", err) @@ -465,12 +467,17 @@ func NewBeatReceiver(settings Settings, receiverConfig map[string]interface{}, u uniq_reg := b.Beat.Info.Monitoring.Namespace.GetRegistry() + reg := b.Info.Monitoring.StateRegistry.GetRegistry("libbeat") + if reg == nil { + reg = b.Info.Monitoring.StateRegistry.NewRegistry("libbeat") + } + tel := uniq_reg.GetRegistry("state") if tel == nil { tel = uniq_reg.NewRegistry("state") } monitors := pipeline.Monitors{ - Metrics: uniq_reg, + Metrics: reg, Telemetry: tel, Logger: logp.L().Named("publisher"), Tracer: b.Instrumentation.Tracer(), @@ -572,7 +579,7 @@ func (b *Beat) createBeater(bt beat.Creator) (beat.Beater, error) { } // Report central management state - mgmt := monitoring.GetNamespace("state").GetRegistry().NewRegistry("management") + mgmt := b.Info.Monitoring.StateRegistry.NewRegistry("management") monitoring.NewBool(mgmt, "enabled").Set(b.Manager.Enabled()) debugf("Initializing output plugins") @@ -590,7 +597,7 @@ func (b *Beat) createBeater(bt beat.Creator) (beat.Beater, error) { var publisher *pipeline.Pipeline monitors := pipeline.Monitors{ Metrics: reg, - Telemetry: monitoring.GetNamespace("state").GetRegistry(), + Telemetry: b.Info.Monitoring.StateRegistry, Logger: logp.L().Named("publisher"), Tracer: b.Instrumentation.Tracer(), } @@ -655,7 +662,7 @@ func (b *Beat) launch(settings Settings, bt beat.Creator) error { svc.BeforeRun() defer svc.Cleanup() - b.registerMetrics() + b.RegisterMetrics() // Start the API Server before the Seccomp lock down, we do this so we can create the unix socket // set the appropriate permission on the unix domain file without having to whitelist anything @@ -763,46 +770,43 @@ func (b *Beat) reexec() error { return b.doReexec() } -// registerMetrics registers metrics with the internal monitoring API. This data +// RegisterMetrics registers metrics with the internal monitoring API. This data // is then exposed through the HTTP monitoring endpoint (e.g. /info and /state) // and/or pushed to Elasticsearch through the x-pack monitoring feature. -func (b *Beat) registerMetrics() { +func (b *Beat) RegisterMetrics() { // info - infoRegistry := monitoring.GetNamespace("info").GetRegistry() - monitoring.NewString(infoRegistry, "version").Set(b.Info.Version) - monitoring.NewString(infoRegistry, "beat").Set(b.Info.Beat) - monitoring.NewString(infoRegistry, "name").Set(b.Info.Name) - monitoring.NewString(infoRegistry, "uuid").Set(b.Info.ID.String()) - monitoring.NewString(infoRegistry, "ephemeral_id").Set(b.Info.EphemeralID.String()) - monitoring.NewString(infoRegistry, "binary_arch").Set(runtime.GOARCH) - monitoring.NewString(infoRegistry, "build_commit").Set(version.Commit()) - monitoring.NewTimestamp(infoRegistry, "build_time").Set(version.BuildTime()) - monitoring.NewBool(infoRegistry, "elastic_licensed").Set(b.Info.ElasticLicensed) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "version").Set(b.Info.Version) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "beat").Set(b.Info.Beat) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "name").Set(b.Info.Name) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "uuid").Set(b.Info.ID.String()) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "ephemeral_id").Set(b.Info.EphemeralID.String()) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "binary_arch").Set(runtime.GOARCH) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "build_commit").Set(version.Commit()) + monitoring.NewTimestamp(b.Info.Monitoring.InfoRegistry, "build_time").Set(version.BuildTime()) + monitoring.NewBool(b.Info.Monitoring.InfoRegistry, "elastic_licensed").Set(b.Info.ElasticLicensed) // Add user metadata data asynchronously (on Windows the lookup can take up to 60s). go func() { if u, err := user.Current(); err != nil { // This usually happens if the user UID does not exist in /etc/passwd. It might be the case on K8S // if the user set securityContext.runAsUser to an arbitrary value. - monitoring.NewString(infoRegistry, "uid").Set(strconv.Itoa(os.Getuid())) - monitoring.NewString(infoRegistry, "gid").Set(strconv.Itoa(os.Getgid())) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "uid").Set(strconv.Itoa(os.Getuid())) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "gid").Set(strconv.Itoa(os.Getgid())) } else { - monitoring.NewString(infoRegistry, "username").Set(u.Username) - monitoring.NewString(infoRegistry, "uid").Set(u.Uid) - monitoring.NewString(infoRegistry, "gid").Set(u.Gid) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "username").Set(u.Username) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "uid").Set(u.Uid) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "gid").Set(u.Gid) } }() - stateRegistry := monitoring.GetNamespace("state").GetRegistry() - // state.service - serviceRegistry := stateRegistry.NewRegistry("service") + serviceRegistry := b.Info.Monitoring.StateRegistry.NewRegistry("service") monitoring.NewString(serviceRegistry, "version").Set(b.Info.Version) monitoring.NewString(serviceRegistry, "name").Set(b.Info.Beat) monitoring.NewString(serviceRegistry, "id").Set(b.Info.ID.String()) // state.beat - beatRegistry := stateRegistry.NewRegistry("beat") + beatRegistry := b.Info.Monitoring.StateRegistry.NewRegistry("beat") monitoring.NewString(beatRegistry, "name").Set(b.Info.Name) } @@ -810,28 +814,10 @@ func (b *Beat) RegisterHostname(useFQDN bool) { hostname := b.Info.FQDNAwareHostname(useFQDN) // info.hostname - var infoRegistry *monitoring.Registry - if b.Info.Monitoring.Namespace != nil { - infoRegistry = b.Info.Monitoring.Namespace.GetRegistry().GetRegistry("info") - if infoRegistry == nil { - infoRegistry = b.Info.Monitoring.Namespace.GetRegistry().NewRegistry("info") - } - } else { - infoRegistry = monitoring.GetNamespace("info").GetRegistry() - } - monitoring.NewString(infoRegistry, "hostname").Set(hostname) + monitoring.NewString(b.Info.Monitoring.InfoRegistry, "hostname").Set(hostname) // state.host - var stateRegistry *monitoring.Registry - if b.Info.Monitoring.Namespace != nil { - stateRegistry = b.Info.Monitoring.Namespace.GetRegistry().GetRegistry("state") - if stateRegistry == nil { - stateRegistry = b.Info.Monitoring.Namespace.GetRegistry().NewRegistry("state") - } - } else { - stateRegistry = monitoring.GetNamespace("state").GetRegistry() - } - monitoring.NewFunc(stateRegistry, "host", host.ReportInfo(hostname), monitoring.Report) + monitoring.NewFunc(b.Info.Monitoring.StateRegistry, "host", host.ReportInfo(hostname), monitoring.Report) } // TestConfig check all settings are ok and the beat can be run @@ -971,6 +957,30 @@ func (b *Beat) Setup(settings Settings, bt beat.Creator, setup SetupSettings) er }()) } +func (b *Beat) SetupRegistry() { + var infoRegistry *monitoring.Registry + if b.Info.Monitoring.Namespace != nil { + infoRegistry = b.Info.Monitoring.Namespace.GetRegistry().GetRegistry("info") + if infoRegistry == nil { + infoRegistry = b.Info.Monitoring.Namespace.GetRegistry().NewRegistry("info") + } + } else { + infoRegistry = monitoring.GetNamespace("info").GetRegistry() + } + b.Info.Monitoring.InfoRegistry = infoRegistry + + var stateRegistry *monitoring.Registry + if b.Info.Monitoring.Namespace != nil { + stateRegistry = b.Info.Monitoring.Namespace.GetRegistry().GetRegistry("state") + if stateRegistry == nil { + stateRegistry = b.Info.Monitoring.Namespace.GetRegistry().NewRegistry("state") + } + } else { + stateRegistry = monitoring.GetNamespace("state").GetRegistry() + } + b.Info.Monitoring.StateRegistry = stateRegistry +} + // handleFlags converts -flag to --flags, parses the command line // flags, and it invokes the HandleFlags callback if implemented by // the Beat. @@ -992,6 +1002,8 @@ func (b *Beat) configure(settings Settings) error { return fmt.Errorf("error loading config file: %w", err) } + b.SetupRegistry() + if err := initPaths(cfg); err != nil { return err } @@ -1515,8 +1527,7 @@ func (b *Beat) registerClusterUUIDFetching() { // Build and return a callback to fetch the Elasticsearch cluster_uuid for monitoring func (b *Beat) clusterUUIDFetchingCallback() elasticsearch.ConnectCallback { - stateRegistry := monitoring.GetNamespace("state").GetRegistry() - elasticsearchRegistry := stateRegistry.NewRegistry("outputs.elasticsearch") + elasticsearchRegistry := b.Info.Monitoring.StateRegistry.NewRegistry("outputs.elasticsearch") clusterUUIDRegVar := monitoring.NewString(elasticsearchRegistry, "cluster_uuid") callback := func(esClient *eslegclient.Connection) error { @@ -1553,8 +1564,7 @@ func (b *Beat) setupMonitoring(settings Settings) (report.Reporter, error) { // Expose monitoring.cluster_uuid in state API if monitoringClusterUUID != "" { - stateRegistry := monitoring.GetNamespace("state").GetRegistry() - monitoringRegistry := stateRegistry.NewRegistry("monitoring") + monitoringRegistry := b.Info.Monitoring.StateRegistry.NewRegistry("monitoring") clusterUUIDRegVar := monitoring.NewString(monitoringRegistry, "cluster_uuid") clusterUUIDRegVar.Set(monitoringClusterUUID) }