Skip to content

Commit 87fef03

Browse files
build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.16 to 0.11.18 (#5089)
* build(deps): bump github.com/elastic/elastic-agent-system-metrics Bumps [github.com/elastic/elastic-agent-system-metrics](https://github.com/elastic/elastic-agent-system-metrics) from 0.11.16 to 0.11.18. - [Release notes](https://github.com/elastic/elastic-agent-system-metrics/releases) - [Commits](elastic/elastic-agent-system-metrics@v0.11.16...v0.11.18) --- updated-dependencies: - dependency-name: github.com/elastic/elastic-agent-system-metrics dependency-version: 0.11.18 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Post dependabot file modifications * Fix metrics setup * Use unique registry for system metrics --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com> Co-authored-by: michel-laterman <[email protected]>
1 parent 21da0b2 commit 87fef03

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

NOTICE-fips.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l
872872

873873
--------------------------------------------------------------------------------
874874
Dependency : github.com/elastic/elastic-agent-system-metrics
875-
Version: v0.11.16
875+
Version: v0.11.18
876876
Licence type (autodetected): Apache-2.0
877877
--------------------------------------------------------------------------------
878878

879-
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].16/LICENSE.txt:
879+
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].18/LICENSE.txt:
880880

881881
Apache License
882882
Version 2.0, January 2004

NOTICE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l
872872

873873
--------------------------------------------------------------------------------
874874
Dependency : github.com/elastic/elastic-agent-system-metrics
875-
Version: v0.11.16
875+
Version: v0.11.18
876876
Licence type (autodetected): Apache-2.0
877877
--------------------------------------------------------------------------------
878878

879-
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].16/LICENSE.txt:
879+
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].18/LICENSE.txt:
880880

881881
Apache License
882882
Version 2.0, January 2004

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/docker/go-units v0.5.0
1010
github.com/elastic/elastic-agent-client/v7 v7.17.2
1111
github.com/elastic/elastic-agent-libs v0.21.2
12-
github.com/elastic/elastic-agent-system-metrics v0.11.16
12+
github.com/elastic/elastic-agent-system-metrics v0.11.18
1313
github.com/elastic/go-elasticsearch/v8 v8.18.1
1414
github.com/elastic/go-ucfg v0.8.8
1515
github.com/fxamacker/cbor/v2 v2.9.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk
3737
github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk=
3838
github.com/elastic/elastic-agent-libs v0.21.2 h1:r4Tokxx8OvFUVw28foiZT/WHwGUM7JFdlb4TVJ25v9M=
3939
github.com/elastic/elastic-agent-libs v0.21.2/go.mod h1:xSeIP3NtOIT4N2pPS4EyURmS1Q8mK0lWZ8Wd1Du6q3w=
40-
github.com/elastic/elastic-agent-system-metrics v0.11.16 h1:cLjuO8pE5cUwPGWUHmy1VOERmJVDaep8gY+U4YRQ5vs=
41-
github.com/elastic/elastic-agent-system-metrics v0.11.16/go.mod h1:qiZC5p1hd8te4XVnhh7FkXdcYhxFnl5i9GJpROtf6zo=
40+
github.com/elastic/elastic-agent-system-metrics v0.11.18 h1:MuFLvHc3kQN/59+3KmRWhOUoXkL5PDzxEbdYbARGexA=
41+
github.com/elastic/elastic-agent-system-metrics v0.11.18/go.mod h1:qiZC5p1hd8te4XVnhh7FkXdcYhxFnl5i9GJpROtf6zo=
4242
github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE=
4343
github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
4444
github.com/elastic/go-elasticsearch/v8 v8.18.1 h1:lPsN2Wk6+QqBeD4ckmOax7G/Y8tAZgroDYG8j6/5Ce0=

internal/pkg/api/metrics.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ var (
5555
// metrics must be explicitly exposed with a call to InitMetrics
5656
// FIXME we have global metrics but an internal and external API; this may lead to some confusion.
5757
func init() {
58-
err := report.SetupMetrics(logger.NewZapStub("instance-metrics"), build.ServiceName, version.DefaultVersion)
59-
if err != nil {
60-
zerolog.Ctx(context.TODO()).Error().Err(err).Msg("unable to initialize metrics") // TODO is used because this may logged during the package load
61-
}
62-
6358
registry = newMetricsRegistry("http_server")
6459
cntHTTPNew = newCounter(registry, "tcp_open")
6560
cntHTTPClose = newCounter(registry, "tcp_close")
@@ -78,6 +73,11 @@ func init() {
7873
cntFileDeliv.Register(routesRegistry.newRegistry("deliverFile"))
7974
cntGetPGP.Register(routesRegistry.newRegistry("getPGPKey"))
8075
cntAuditUnenroll.Register(routesRegistry.newRegistry("auditUnenroll"))
76+
77+
err := report.SetupMetrics(logger.NewZapStub("instance-metrics"), build.ServiceName, version.DefaultVersion, monitoring.NewRegistry(), registry.registry)
78+
if err != nil {
79+
zerolog.Ctx(context.TODO()).Error().Err(err).Msg("unable to initialize metrics") // TODO is used because this may logged during the package load
80+
}
8181
}
8282

8383
// metricsRegistry wraps libbeat and prometheus registries

0 commit comments

Comments
 (0)