chore: update OpenTelemetry v0.2.30 / v0.63.0 (#12119)
This commit is contained in:
parent
ea1ae642cb
commit
99a48f460e
12
go.mod
12
go.mod
|
|
@ -90,9 +90,9 @@ require (
|
|||
github.com/hashicorp/consul/api v1.15.2
|
||||
github.com/hashicorp/go-uuid v1.0.3
|
||||
github.com/influxdata/go-syslog/v3 v3.0.0
|
||||
github.com/influxdata/influxdb-observability/common v0.2.28
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.28
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.28
|
||||
github.com/influxdata/influxdb-observability/common v0.2.30
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.30
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.30
|
||||
github.com/influxdata/line-protocol/v2 v2.2.1
|
||||
github.com/influxdata/tail v1.0.1-0.20210707231403-b283181d1fa7
|
||||
github.com/influxdata/toml v0.0.0-20190415235208-270119a8ce65
|
||||
|
|
@ -145,7 +145,7 @@ require (
|
|||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/sleepinggenius2/gosmi v0.4.4
|
||||
github.com/snowflakedb/gosnowflake v1.6.13
|
||||
github.com/stretchr/testify v1.8.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/tbrandon/mbserver v0.0.0-20170611213546-993e1772cc62
|
||||
github.com/testcontainers/testcontainers-go v0.14.0
|
||||
github.com/thomasklein94/packer-plugin-libvirt v0.3.4
|
||||
|
|
@ -160,7 +160,7 @@ require (
|
|||
github.com/xdg/scram v1.0.5
|
||||
github.com/yuin/goldmark v1.5.2
|
||||
go.mongodb.org/mongo-driver v1.10.2
|
||||
go.opentelemetry.io/collector/pdata v0.61.0
|
||||
go.opentelemetry.io/collector/pdata v0.63.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.32.1
|
||||
go.opentelemetry.io/otel/sdk/metric v0.32.1
|
||||
go.starlark.net v0.0.0-20220328144851-d1966c6b9fcd
|
||||
|
|
@ -372,7 +372,7 @@ require (
|
|||
github.com/signalfx/gohistogram v0.0.0-20160107210732-1ccfd2ff5083 // indirect
|
||||
github.com/signalfx/sapm-proto v0.7.2 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/stretchr/objx v0.4.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.10 // indirect
|
||||
|
|
|
|||
22
go.sum
22
go.sum
|
|
@ -1455,12 +1455,12 @@ github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7m
|
|||
github.com/influxdata/go-syslog/v3 v3.0.0 h1:jichmjSZlYK0VMmlz+k4WeOQd7z745YLsvGMqwtYt4I=
|
||||
github.com/influxdata/go-syslog/v3 v3.0.0/go.mod h1:tulsOp+CecTAYC27u9miMgq21GqXRW6VdKbOG+QSP4Q=
|
||||
github.com/influxdata/influxdb v1.8.4/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI=
|
||||
github.com/influxdata/influxdb-observability/common v0.2.28 h1:kn3i4AjqNe/WEMrcINeuWd5xJe8fyK6g5rCDxBw8CbY=
|
||||
github.com/influxdata/influxdb-observability/common v0.2.28/go.mod h1:Zn0qergkR7OQZv+KPLLFThJvOXBoj45nvqMIYn8Sw5w=
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.28 h1:EcmE4fAp6VjGUlRrW6csnIZTU+zWSXY3rBPu3RKnttI=
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.28/go.mod h1:KN5pPyhZb027IBGoGNHVt6VqM7kZOcVnf6VudNGySSY=
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.28 h1:XLclpFnXj2a2Rpe45VAB5R3x0swzxrYcz6ZVMbvOBXM=
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.28/go.mod h1:tl5sHk8+kSl3QxbeIRDxODGG/bpw43gXE6FywDe7xTw=
|
||||
github.com/influxdata/influxdb-observability/common v0.2.30 h1:YMeCZBfr+9bR8M6milxA4dr/ZzSS7Hq9BzergXNBJIY=
|
||||
github.com/influxdata/influxdb-observability/common v0.2.30/go.mod h1:2Ha9T3itb6PAoUfJT7ImGO6tBv5+OPfYzqFeB8k+22k=
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.30 h1:WAoiVBv51IiGt0kwKVR7lrIJSR8x3eWn7wnWv04/aLw=
|
||||
github.com/influxdata/influxdb-observability/influx2otel v0.2.30/go.mod h1:bkpYXZYASorxW8l02p5IpCqe6nyUMafXrfXOCiDexFc=
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.30 h1:Mlb/zwPtfXthFfUsutXUtOiHhdAnUrzvcsqj6iK9eQ0=
|
||||
github.com/influxdata/influxdb-observability/otel2influx v0.2.30/go.mod h1:4AsRDILDSV5XoZ8Rm/n8W3CoOaZsMfOi77kXX1OebKk=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=
|
||||
|
|
@ -2402,8 +2402,9 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+
|
|||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
||||
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
|
|
@ -2418,8 +2419,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
|
||||
github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
|
||||
github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
|
|
@ -2624,8 +2626,8 @@ go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48
|
|||
go.opentelemetry.io/collector/pdata v0.54.0/go.mod h1:1nSelv/YqGwdHHaIKNW9ZOHSMqicDX7W4/7TjNCm6N8=
|
||||
go.opentelemetry.io/collector/pdata v0.56.0/go.mod h1:mYcCREWiIJyHss0dbU+GSiz2tmGZ6u09vtfkKTciog4=
|
||||
go.opentelemetry.io/collector/pdata v0.57.2/go.mod h1:RU9I8lwBUxucwOsSYzHEcHi15M9QaX78hgQ2PRdSxV0=
|
||||
go.opentelemetry.io/collector/pdata v0.61.0 h1:jPUReUpR/D1xsigfRxyXA7cYMnXfnK+D7z61W6F9moo=
|
||||
go.opentelemetry.io/collector/pdata v0.61.0/go.mod h1:0hqgNMRneVXaLNelv3q0XKJbyBW9aMDwyC15pKd30+E=
|
||||
go.opentelemetry.io/collector/pdata v0.63.0 h1:YPeMzF4OYFeMW6E+A/eQEv5s32wpc5wEa24H2PP5LeE=
|
||||
go.opentelemetry.io/collector/pdata v0.63.0/go.mod h1:IzvXUGQml2mrnvdb8zIlEW3qQs9oFLdD2hLwJdZ+pek=
|
||||
go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q=
|
||||
go.opentelemetry.io/collector/semconv v0.54.0/go.mod h1:HAGkPKNMhc4kEHevEqVIEtUuvsRQMIbUWBb8yBrqEwk=
|
||||
go.opentelemetry.io/collector/semconv v0.56.0/go.mod h1:EH1wbDvTyqKpKBBpoMIe0KQk2plCcFS66Mo17WtR7CQ=
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ func (o *OpenTelemetry) Start(accumulator telegraf.Accumulator) error {
|
|||
influxWriter := &writeToAccumulator{accumulator}
|
||||
o.grpcServer = grpc.NewServer(grpcOptions...)
|
||||
|
||||
ptraceotlp.RegisterServer(o.grpcServer, newTraceService(logger, influxWriter))
|
||||
ptraceotlp.RegisterGRPCServer(o.grpcServer, newTraceService(logger, influxWriter))
|
||||
ms, err := newMetricsService(logger, influxWriter, o.MetricsSchema)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pmetricotlp.RegisterServer(o.grpcServer, ms)
|
||||
plogotlp.RegisterServer(o.grpcServer, newLogsService(logger, influxWriter))
|
||||
pmetricotlp.RegisterGRPCServer(o.grpcServer, ms)
|
||||
plogotlp.RegisterGRPCServer(o.grpcServer, newLogsService(logger, influxWriter))
|
||||
|
||||
if o.listener == nil {
|
||||
o.listener, err = net.Listen("tcp", o.ServiceAddress)
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ func (o *OpenTelemetry) Write(metrics []telegraf.Metric) error {
|
|||
if len(o.Attributes) > 0 {
|
||||
for i := 0; i < md.Metrics().ResourceMetrics().Len(); i++ {
|
||||
for k, v := range o.Attributes {
|
||||
md.Metrics().ResourceMetrics().At(i).Resource().Attributes().PutString(k, v)
|
||||
md.Metrics().ResourceMetrics().At(i).Resource().Attributes().PutStr(k, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,15 +27,15 @@ func TestOpenTelemetry(t *testing.T) {
|
|||
expect := pmetric.NewMetrics()
|
||||
{
|
||||
rm := expect.ResourceMetrics().AppendEmpty()
|
||||
rm.Resource().Attributes().PutString("host.name", "potato")
|
||||
rm.Resource().Attributes().PutString("attr-key", "attr-val")
|
||||
rm.Resource().Attributes().PutStr("host.name", "potato")
|
||||
rm.Resource().Attributes().PutStr("attr-key", "attr-val")
|
||||
ilm := rm.ScopeMetrics().AppendEmpty()
|
||||
ilm.Scope().SetName("My Library Name")
|
||||
m := ilm.Metrics().AppendEmpty()
|
||||
m.SetName("cpu_temp")
|
||||
m.SetEmptyGauge()
|
||||
dp := m.Gauge().DataPoints().AppendEmpty()
|
||||
dp.Attributes().PutString("foo", "bar")
|
||||
dp.Attributes().PutStr("foo", "bar")
|
||||
dp.SetTimestamp(pcommon.Timestamp(1622848686000000000))
|
||||
dp.SetDoubleValue(87.332)
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ func newMockOtelService(t *testing.T) *mockOtelService {
|
|||
grpcServer: grpcServer,
|
||||
}
|
||||
|
||||
pmetricotlp.RegisterServer(grpcServer, mockOtelService)
|
||||
pmetricotlp.RegisterGRPCServer(grpcServer, mockOtelService)
|
||||
go func() { assert.NoError(t, grpcServer.Serve(listener)) }()
|
||||
|
||||
grpcClient, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock())
|
||||
|
|
|
|||
Loading…
Reference in New Issue