Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 177cdfc

Browse files
committed
Fix CI
1 parent 7707683 commit 177cdfc

File tree

7 files changed

+30
-7
lines changed

7 files changed

+30
-7
lines changed

LICENSE-3rdparty.csv

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,20 @@ pkg/inframetadata,github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attribute
334334
pkg/inframetadata,github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source,UNKNOWN,"Copyright [2023-Present] Datadog, Inc."
335335
pkg/inframetadata,github.com/davecgh/go-spew/spew,ISC,Copyright (c) 2012-2016 Dave Collins <[email protected]>
336336
pkg/inframetadata,github.com/gogo/protobuf/gogoproto,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
337+
pkg/inframetadata,github.com/gogo/protobuf/jsonpb,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
337338
pkg/inframetadata,github.com/gogo/protobuf/proto,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
338339
pkg/inframetadata,github.com/gogo/protobuf/protoc-gen-gogo/descriptor,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
340+
pkg/inframetadata,github.com/gogo/protobuf/sortkeys,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
341+
pkg/inframetadata,github.com/gogo/protobuf/types,BSD-3-Clause,"Copyright (c) 2013, The GoGo Authors. All rights reserved | Copyright 2010 The Go Authors. All rights reserved | Sendgrid, Inc | Vastech SA (PTY) LTD | Walter Schulze <[email protected]> | Anton Povarov <[email protected]> | Brian Goff <[email protected]> | Clayton Coleman <[email protected]> | Denis Smirnov <[email protected]> | DongYun Kang <[email protected]> | Dwayne Schultz <[email protected]> | Georg Apitz <[email protected]> | Gustav Paul <[email protected]> | Johan Brandhorst <[email protected]> | John Shahid <[email protected]> | John Tuley <[email protected]> | Laurent <[email protected]> | Patrick Lee <[email protected]> | Peter Edge <[email protected]> | Roger Johansson <[email protected]> | Sam Nguyen <[email protected]> | Sergio Arbeo <[email protected]> | Stephen J Day <[email protected]> | Tamir Duberstein <[email protected]> | Todd Eisenberger <[email protected]> | Tormod Erevik Lea <[email protected]> | Vyacheslav Kim <[email protected]> | Walter Schulze <[email protected]>"
339342
pkg/inframetadata,github.com/golang/protobuf/jsonpb,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
340343
pkg/inframetadata,github.com/golang/protobuf/proto,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
341344
pkg/inframetadata,github.com/golang/protobuf/ptypes,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
342345
pkg/inframetadata,github.com/golang/protobuf/ptypes/any,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
343346
pkg/inframetadata,github.com/golang/protobuf/ptypes/duration,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
344347
pkg/inframetadata,github.com/golang/protobuf/ptypes/timestamp,BSD-3-Clause,Copyright 2010 The Go Authors. All rights reserved
348+
pkg/inframetadata,github.com/json-iterator/go,MIT,Copyright (c) 2016 json-iterator
349+
pkg/inframetadata,github.com/modern-go/concurrent,Apache-2.0,Copyright (c) 2018 Tao Wen
350+
pkg/inframetadata,github.com/modern-go/reflect2,Apache-2.0,Copyright (c) 2018 Tao Wen
345351
pkg/inframetadata,github.com/pmezard/go-difflib/difflib,BSD-3-Clause,"Copyright (c) 2013, Patrick Mezard"
346352
pkg/inframetadata,github.com/stretchr/testify/assert,MIT,"Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors"
347353
pkg/inframetadata,github.com/stretchr/testify/require,MIT,"Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors"
@@ -355,7 +361,10 @@ pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/data/protogen/log
355361
pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1,Apache-2.0,Copyright The OpenTelemetry Authors
356362
pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1,Apache-2.0,Copyright The OpenTelemetry Authors
357363
pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1,Apache-2.0,Copyright The OpenTelemetry Authors
364+
pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/json,Apache-2.0,Copyright The OpenTelemetry Authors
365+
pkg/inframetadata,go.opentelemetry.io/collector/pdata/internal/otlp,Apache-2.0,Copyright The OpenTelemetry Authors
358366
pkg/inframetadata,go.opentelemetry.io/collector/pdata/pcommon,Apache-2.0,Copyright The OpenTelemetry Authors
367+
pkg/inframetadata,go.opentelemetry.io/collector/pdata/pmetric,Apache-2.0,Copyright The OpenTelemetry Authors
359368
pkg/inframetadata,go.opentelemetry.io/collector/semconv/v1.18.0,Apache-2.0,Copyright The OpenTelemetry Authors
360369
pkg/inframetadata,go.opentelemetry.io/collector/semconv/v1.6.1,Apache-2.0,Copyright The OpenTelemetry Authors
361370
pkg/inframetadata,go.uber.org/atomic,MIT,"Copyright (c) 2016 Uber Technologies, Inc"

pkg/inframetadata/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ require (
1515
github.com/davecgh/go-spew v1.1.1 // indirect
1616
github.com/gogo/protobuf v1.3.2 // indirect
1717
github.com/golang/protobuf v1.5.3 // indirect
18+
github.com/json-iterator/go v1.1.12 // indirect
19+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
20+
github.com/modern-go/reflect2 v1.0.2 // indirect
1821
github.com/pmezard/go-difflib v1.0.0 // indirect
1922
go.uber.org/atomic v1.7.0 // indirect
2023
golang.org/x/net v0.18.0 // indirect

pkg/inframetadata/go.sum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
99
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
1010
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
1111
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
12+
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
13+
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
14+
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
1215
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
1316
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
1417
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
1518
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
19+
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
20+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
21+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
22+
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
23+
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
1624
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
1725
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1826
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=

pkg/inframetadata/gohai/gohai.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ func (p *Payload) Platform() map[string]string {
4242
}
4343

4444
// CPU returns a reference to the Gohai payload 'cpu' map.
45-
func (p *Payload) CPU() map[string]string {
46-
return p.Gohai.Gohai.CPU.(map[string]string)
45+
func (p *Payload) CPU() map[string]any {
46+
return p.Gohai.Gohai.CPU.(map[string]any)
4747
}
4848

4949
// gohaiSerializer implements json.Marshaler and json.Unmarshaler on top of a gohai payload
@@ -86,7 +86,7 @@ func NewEmpty() Payload {
8686
Gohai: gohaiMarshaler{
8787
Gohai: &Gohai{
8888
Platform: map[string]string{},
89-
CPU: map[string]string{},
89+
CPU: map[string]any{},
9090
},
9191
},
9292
}

pkg/inframetadata/internal/hostmap/hostmap.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (m *HostMap) Set(md payload.HostMetadata) error {
105105
}
106106

107107
// newOrFetchHostMetadata returns the host metadata payload for a given host or creates a new one.
108-
// This method is NOT thread-safe and should be called from within a mutex.
108+
// This method is NOT thread-safe and should be called while holding the m.mu mutex.
109109
func (m *HostMap) newOrFetchHostMetadata(host string) (payload.HostMetadata, bool) {
110110
md, ok := m.hosts[host]
111111
if !ok {
@@ -189,7 +189,9 @@ func (m *HostMap) Update(host string, res pcommon.Resource) (changed bool, md pa
189189

190190
func (m *HostMap) UpdateFromMetric(host string, metric pmetric.Metric) {
191191
var point pmetric.NumberDataPoint
192-
switch metric.MetricType() {
192+
193+
// Take last available point
194+
switch metric.Type() {
193195
case pmetric.MetricTypeGauge:
194196
lastIndex := metric.Gauge().DataPoints().Len() - 1
195197
point = metric.Gauge().DataPoints().At(lastIndex)
@@ -201,6 +203,7 @@ func (m *HostMap) UpdateFromMetric(host string, metric pmetric.Metric) {
201203
return
202204
}
203205

206+
// Take value from point
204207
var value float64
205208
switch point.ValueType() {
206209
case pmetric.NumberDataPointValueTypeInt:

pkg/inframetadata/internal/hostmap/hostmap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func TestUpdate(t *testing.T) {
141141
fieldPlatformKernelRelease: "5.19.0-43-generic",
142142
fieldPlatformKernelVersion: "#82~18.04.1-Ubuntu SMP Fri Apr 16 15:10:02 UTC 2021",
143143
})
144-
assert.Equal(t, md.Payload.Gohai.Gohai.CPU, map[string]string{
144+
assert.Equal(t, md.Payload.Gohai.Gohai.CPU, map[string]any{
145145
fieldCPUCacheSize: "12288000",
146146
fieldCPUFamily: "6",
147147
fieldCPUModel: "10",

pkg/inframetadata/reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (r *Reporter) ConsumeMetrics(md pmetric.Metrics) error {
168168
metricsArray := ilms.At(j).Metrics()
169169
for k := 0; k < metricsArray.Len(); k++ {
170170
metric := metricsArray.At(k)
171-
if _, ok := hostmap.KnownMetrics[metric.Name()]; ok {
171+
if _, ok := hostmap.TrackedMetrics[metric.Name()]; ok {
172172
r.hostMap.UpdateFromMetric(host, metric)
173173
}
174174
}

0 commit comments

Comments
 (0)