Skip to content

Commit 9622dc4

Browse files
committed
Fixing conflicts
1 parent 591a42f commit 9622dc4

File tree

5 files changed

+8
-45
lines changed

5 files changed

+8
-45
lines changed

NOTICE-fips.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,19 +842,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l
842842

843843
--------------------------------------------------------------------------------
844844
Dependency : github.com/elastic/elastic-agent-system-metrics
845-
<<<<<<< HEAD
846-
Version: v0.11.15
847-
Licence type (autodetected): Apache-2.0
848-
--------------------------------------------------------------------------------
849-
850-
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.11.15/LICENSE.txt:
851-
=======
852845
Version: v0.13.2
853846
Licence type (autodetected): Apache-2.0
854847
--------------------------------------------------------------------------------
855848

856849
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.13.2/LICENSE.txt:
857-
>>>>>>> 898abd5 (build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.18 to 0.12.0 (#5273))
858850

859851
Apache License
860852
Version 2.0, January 2004

NOTICE.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,19 +842,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-l
842842

843843
--------------------------------------------------------------------------------
844844
Dependency : github.com/elastic/elastic-agent-system-metrics
845-
<<<<<<< HEAD
846-
Version: v0.11.15
847-
Licence type (autodetected): Apache-2.0
848-
--------------------------------------------------------------------------------
849-
850-
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.11.15/LICENSE.txt:
851-
=======
852845
Version: v0.13.2
853846
Licence type (autodetected): Apache-2.0
854847
--------------------------------------------------------------------------------
855848

856849
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-system-metrics@v0.13.2/LICENSE.txt:
857-
>>>>>>> 898abd5 (build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.18 to 0.12.0 (#5273))
858850

859851
Apache License
860852
Version 2.0, January 2004

go.mod

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ require (
88
github.com/docker/go-units v0.5.0
99
github.com/elastic/elastic-agent-client/v7 v7.17.2
1010
github.com/elastic/elastic-agent-libs v0.24.0
11-
<<<<<<< HEAD
12-
github.com/elastic/elastic-agent-system-metrics v0.11.15
13-
github.com/elastic/go-elasticsearch/v8 v8.17.1
14-
=======
1511
github.com/elastic/elastic-agent-system-metrics v0.13.2
16-
github.com/elastic/go-elasticsearch/v8 v8.19.0
17-
>>>>>>> 898abd5 (build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.18 to 0.12.0 (#5273))
12+
github.com/elastic/go-elasticsearch/v8 v8.17.1
1813
github.com/elastic/go-ucfg v0.8.8
1914
github.com/fxamacker/cbor/v2 v2.8.0
2015
github.com/go-chi/chi/v5 v5.2.3

go.sum

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,12 @@ github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk
3535
github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk=
3636
github.com/elastic/elastic-agent-libs v0.24.0 h1:8skd0le8Y/zAGVaj4m44ljiJMAp0xuJz07ngDTL/1kM=
3737
github.com/elastic/elastic-agent-libs v0.24.0/go.mod h1:xSeIP3NtOIT4N2pPS4EyURmS1Q8mK0lWZ8Wd1Du6q3w=
38-
<<<<<<< HEAD
39-
github.com/elastic/elastic-agent-system-metrics v0.11.15 h1:RWX0n6LakadsqB6YB2I7AIXyMlEO4qBUGWn4A+aGeKA=
40-
github.com/elastic/elastic-agent-system-metrics v0.11.15/go.mod h1:qiZC5p1hd8te4XVnhh7FkXdcYhxFnl5i9GJpROtf6zo=
38+
github.com/elastic/elastic-agent-system-metrics v0.13.2 h1:R4ogKHESuWhWTtopnw/aHnBxxSZbxd7KHV4GefdwT2M=
39+
github.com/elastic/elastic-agent-system-metrics v0.13.2/go.mod h1:ezM1kzDUT+vWXFh5oK8QXB/AEB0UoLWqWA8rkRicFFo=
4140
github.com/elastic/elastic-transport-go/v8 v8.6.1 h1:h2jQRqH6eLGiBSN4eZbQnJLtL4bC5b4lfVFRjw2R4e4=
4241
github.com/elastic/elastic-transport-go/v8 v8.6.1/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
4342
github.com/elastic/go-elasticsearch/v8 v8.17.1 h1:bOXChDoCMB4TIwwGqKd031U8OXssmWLT3UrAr9EGs3Q=
4443
github.com/elastic/go-elasticsearch/v8 v8.17.1/go.mod h1:MVJCtL+gJJ7x5jFeUmA20O7rvipX8GcQmo5iBcmaJn4=
45-
=======
46-
github.com/elastic/elastic-agent-system-metrics v0.13.2 h1:R4ogKHESuWhWTtopnw/aHnBxxSZbxd7KHV4GefdwT2M=
47-
github.com/elastic/elastic-agent-system-metrics v0.13.2/go.mod h1:ezM1kzDUT+vWXFh5oK8QXB/AEB0UoLWqWA8rkRicFFo=
48-
github.com/elastic/elastic-transport-go/v8 v8.7.0 h1:OgTneVuXP2uip4BA658Xi6Hfw+PeIOod2rY3GVMGoVE=
49-
github.com/elastic/elastic-transport-go/v8 v8.7.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
50-
github.com/elastic/go-elasticsearch/v8 v8.19.0 h1:VmfBLNRORY7RZL+9hTxBD97ehl9H8Nxf2QigDh6HuMU=
51-
github.com/elastic/go-elasticsearch/v8 v8.19.0/go.mod h1:F3j9e+BubmKvzvLjNui/1++nJuJxbkhHefbaT0kFKGY=
52-
>>>>>>> 898abd5 (build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.18 to 0.12.0 (#5273))
5344
github.com/elastic/go-structform v0.0.12 h1:HXpzlAKyej8T7LobqKDThUw7BMhwV6Db24VwxNtgxCs=
5445
github.com/elastic/go-structform v0.0.12/go.mod h1:CZWf9aIRYY5SuKSmOhtXScE5uQiLZNqAFnwKR4OrIM4=
5546
github.com/elastic/go-sysinfo v1.15.0 h1:54pRFlAYUlVNQ2HbXzLVZlV+fxS7Eax49stzg95M4Xw=

internal/pkg/api/metrics.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ import (
1010
"fmt"
1111
"sync"
1212

13+
"github.com/elastic/elastic-agent-system-metrics/report"
14+
"github.com/elastic/fleet-server/v7/version"
15+
"github.com/rs/zerolog"
16+
1317
"github.com/prometheus/client_golang/prometheus"
1418
"github.com/prometheus/client_golang/prometheus/promhttp"
15-
"github.com/rs/zerolog"
1619
apmprometheus "go.elastic.co/apm/module/apmprometheus/v2"
1720
"go.elastic.co/apm/v2"
1821

1922
"github.com/elastic/elastic-agent-libs/api"
2023
cfglib "github.com/elastic/elastic-agent-libs/config"
2124
"github.com/elastic/elastic-agent-libs/monitoring"
22-
"github.com/elastic/elastic-agent-system-metrics/report"
23-
2425
"github.com/elastic/fleet-server/v7/internal/pkg/build"
2526
"github.com/elastic/fleet-server/v7/internal/pkg/config"
2627
"github.com/elastic/fleet-server/v7/internal/pkg/dl"
2728
"github.com/elastic/fleet-server/v7/internal/pkg/limit"
2829
"github.com/elastic/fleet-server/v7/internal/pkg/logger"
29-
"github.com/elastic/fleet-server/v7/version"
3030
)
3131

3232
var (
@@ -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,8 +73,6 @@ func init() {
7873
cntFileDeliv.Register(routesRegistry.newRegistry("deliverFile"))
7974
cntGetPGP.Register(routesRegistry.newRegistry("getPGPKey"))
8075
cntAuditUnenroll.Register(routesRegistry.newRegistry("auditUnenroll"))
81-
<<<<<<< HEAD
82-
=======
8376

8477
err := report.SetupMetricsOptions(report.MetricOptions{
8578
Logger: zap.NewStub("instance-metrics"),
@@ -91,7 +84,7 @@ func init() {
9184
if err != nil {
9285
zerolog.Ctx(context.TODO()).Error().Err(err).Msg("unable to initialize metrics") // TODO is used because this may logged during the package load
9386
}
94-
>>>>>>> 898abd5 (build(deps): bump github.com/elastic/elastic-agent-system-metrics from 0.11.18 to 0.12.0 (#5273))
87+
9588
}
9689

9790
// metricsRegistry wraps libbeat and prometheus registries

0 commit comments

Comments
 (0)