jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.52k stars 2.44k forks source link

Fix linter errors from deprecations in OTEL 0.110 #6013

Closed yurishkuro closed 1 month ago

yurishkuro commented 1 month ago

The upgrade PR #6012 is failing with linter deprecation errors, need code changes to use new APIs.

cmd/collector/app/handler/otlp_receiver.go:203:37: SA1019: component.DataType is deprecated: [v0.110.0] Use pipeline.Signal instead. (staticcheck)
func (*otelHost) GetExporters() map[component.DataType]map[component.ID]component.Component {
                                    ^
cmd/collector/app/handler/otlp_receiver_test.go:141:56: SA1019: component.DataTypeTraces is deprecated: [v0.110.0] Use pipeline.SignalTraces instead. (staticcheck)
    assert.Nil(t, host.GetFactory(component.KindReceiver, component.DataTypeTraces))
                                                          ^
cmd/jaeger/internal/exporters/storageexporter/factory.go:42:30: SA1019: exporterhelper.TimeoutSettings is deprecated: [v0.110.0] Use TimeoutConfig instead. (staticcheck)
        exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}),
                                   ^
cmd/jaeger/internal/exporters/storageexporter/factory.go:44:28: SA1019: exporterhelper.QueueSettings is deprecated: [v0.110.0] Use QueueConfig instead. (staticcheck)
        exporterhelper.WithQueue(exporterhelper.QueueSettings{Enabled: false}),
                                 ^
cmd/jaeger/internal/extension/remotesampling/extension.go:270:27: SA1019: ext.cfg.GRPC.ToServer is deprecated: [v0.110.0] If providing a [grpc.ServerOption], use [ServerConfig.ToServerWithOptions] with [WithGrpcServerOption] instead. (staticcheck)
    if ext.grpcServer, err = ext.cfg.GRPC.ToServer(ctx, host, ext.telemetry); err != nil {
                             ^
plugin/storage/grpc/config.go:33:20: SA1019: exporterhelper.TimeoutSettings is deprecated: [v0.110.0] Use TimeoutConfig instead. (staticcheck)
        TimeoutSettings: exporterhelper.TimeoutSettings{
                         ^
plugin/storage/grpc/config.go:45:20: SA1019: exporterhelper.TimeoutSettings is deprecated: [v0.110.0] Use TimeoutConfig instead. (staticcheck)
        TimeoutSettings: exporterhelper.TimeoutSettings{
                         ^
plugin/storage/grpc/factory.go:105:10: SA1019: f.configV2.ToClientConn is deprecated: [v0.110.0] If providing a [grpc.DialOption], use [ClientConfig.ToClientConnWithOptions] with [WithGrpcDialOption] instead. (staticcheck)
        return f.configV2.ToClientConn(context.Background(), componenttest.NewNopHost(), telset, opts...)
               ^
plugin/storage/grpc/factory_test.go:169:20: SA1019: exporterhelper.TimeoutSettings is deprecated: [v0.110.0] Use TimeoutConfig instead. (staticcheck)
        TimeoutSettings: exporterhelper.TimeoutSettings{
                         ^