Fleet / APM-server Panic with Jenkins OpenTelemetry plugin

Hi everyone,

I have set a jenkins Opentelemetry output to a local apm-server deployed by fleet.
Most of the time it works well, but sometime apm-server panic, and i really don't know how to deal with it.
Unfortunatly, i don't know what the root cause is on jenkins side but maybe you will have an idea ?

The error message from apm-server is :

panic: interface conversion: interface {} is nil, not string
goroutine 261 [running]:
github.com/elastic/apm-data/input/otlp.setLabel({0xc000048d00, 0x1b}, 0xc00105a160, {0x1d0c900?, 0xc0005cdab8?})
github.com/elastic/apm-data@v1.9.1/input/otlp/metadata.go:532 +0x5f1
github.com/elastic/apm-data/input/otlp.TranslateTransaction.func1({0xc000048b40, 0x1b}, {0xc0010581b0?, 0xc000ef5960?})
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:295 +0x90a
go.opentelemetry.io/collector/pdata/pcommon.Map.Range({0xc00021abc0?, 0xc000ef5960?}, 0xc00112a968)
go.opentelemetry.io/collector/pdata@v1.12.0/pcommon/map.go:222 +0x97
github.com/elastic/apm-data/input/otlp.TranslateTransaction({0xc00021abc0?, 0xc000ef5960?}, {0xc00021ac20?, 0xc000ef5960?}, {0xc00043a850?, 0xc000ef5960?}, 0xc00105a160)
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:269 +0x2b7
github.com/elastic/apm-data/input/otlp.(*Consumer).convertSpan(0xc000299c80, {0xc00021ab60?, 0xc000ef5960?}, {0xc00043a850?, 0xc000ef5960?}, 0xc000e85b80, 0x0, 0xc0005cda40)
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:209 +0x8da
github.com/elastic/apm-data/input/otlp.(*Consumer).convertScopeSpans(0xc000299c80, {0xc00043a850?, 0xc000ef5960?}, 0xc000e85b80, 0x0, 0xc0005cda40)
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:151 +0x70
github.com/elastic/apm-data/input/otlp.(*Consumer).convertResourceSpans(0xc000299c80, {0xc00102a1e0?, 0xc000ef5960?}, {0xc001103b40?, 0x1?, 0x3912e20?}, 0xc0005cda40)
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:139 +0x1ac
github.com/elastic/apm-data/input/otlp.(*Consumer).ConsumeTracesWithResult(0xc000299c80, {0x2539258, 0xc000e4b620}, {0xc0005cd950?, 0xc000ef5960?})
github.com/elastic/apm-data@v1.9.1/input/otlp/traces.go:115 +0x332
github.com/elastic/apm-server/internal/beater/otlp.(*tracesService).Export(0xc0000cc670, {0x2539258, 0xc000e4b620}, {0xc0005cd950?, 0xc000ef5960?})
github.com/elastic/apm-server/internal/beater/otlp/grpc.go:100 +0x9d
go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp.rawTracesServer.Export({{0x252f9d0?, 0xc0000cc670?}}, {0x2539258, 0xc000e4b620}, 0xc0005cd950)
go.opentelemetry.io/collector/pdata@v1.12.0/ptrace/ptraceotlp/grpc.go:89 +0xea
go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler.func1({0x2539258?, 0xc000e4b620?}, {0x2082fa0?, 0xc0005cd950?})
go.opentelemetry.io/collector/pdata@v1.12.0/internal/data/protogen/collector/trace/v1/trace_service.pb.go:310 +0xcb
github.com/elastic/apm-server/internal/beater.(*Runner).Run.AnonymousRateLimit.func22({0x2539258, 0xc000e4b620}, {0x2082fa0, 0xc0005cd950}, 0x151c305?, 0xc0005cd9e0)
github.com/elastic/apm-server/internal/beater/interceptors/ratelimit.go:59 +0x174
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b620}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
github.com/elastic/apm-server/internal/beater.(*Runner).Run.Auth.func21({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950}, 0xc000ec65e0?, 0xc001103b00)
github.com/elastic/apm-server/internal/beater/interceptors/auth.go:76 +0x16a
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
github.com/elastic/apm-server/internal/beater.(*Runner).Run.Timeout.func20({0x2539258?, 0xc000e4b560?}, {0x2082fa0?, 0xc0005cd950?}, 0xc000ec65e0?, 0xc0005cd9e0?)
github.com/elastic/apm-server/internal/beater/interceptors/timeout.go:40 +0x2e
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
github.com/elastic/apm-server/internal/beater/interceptors.Metrics.(*metricsInterceptor).Interceptor.func1({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950}, 0xc000ec65e0, 0xc001103a80)
github.com/elastic/apm-server/internal/beater/interceptors/metrics.go:92 +0x26c
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
github.com/elastic/apm-server/internal/beater.(*Runner).Run.Logging.func19({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950}, 0xc000ec65e0, 0xc001103a40)
github.com/elastic/apm-server/internal/beater/interceptors/logging.go:54 +0x1ce
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b560}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
github.com/elastic/apm-server/internal/beater.(*Runner).Run.ClientMetadata.func18({0x2539258, 0xc000e4b500}, {0x2082fa0, 0xc0005cd950}, 0xc000ec65e0?, 0xc001103a00)
github.com/elastic/apm-server/internal/beater/interceptors/metadata.go:66 +0x276
google.golang.org/grpc.getChainUnaryHandler.func1({0x2539258, 0xc000e4b500}, {0x2082fa0, 0xc0005cd950})
google.golang.org/grpc@v1.65.0/server.go:1196 +0xb2
go.elastic.co/apm/module/apmgrpc/v2.NewUnaryServerInterceptor.func1({0x2539258?, 0xc000e4b500?}, {0x2082fa0?, 0xc0005cd950?}, 0xc000ec65e0?, 0xc0005cd9e0?)
go.elastic.co/apm/module/apmgrpc/v2@v2.6.0/server.go:71 +0xf6
google.golang.org/grpc.NewServer.chainUnaryServerInterceptors.chainUnaryInterceptors.func1({0x2539258, 0xc000e4b500}, {0x2082fa0, 0xc0005cd950}, 0xc000ec65e0, 0x80?)
google.golang.org/grpc@v1.65.0/server.go:1187 +0x85
go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1._TraceService_Export_Handler({0x1e31260, 0xc00004cf40}, {0x2539258, 0xc000e4b500}, 0xc0009e1c80, 0xc0000b0b00)
go.opentelemetry.io/collector/pdata@v1.12.0/internal/data/protogen/collector/trace/v1/trace_service.pb.go:312 +0x143
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000428200, {0x2539258, 0xc000e4b470}, {0x2543f00, 0xc0005a6000}, 0xc000e9d560, 0xc0003af710, 0x38e33a0, 0x0)
google.golang.org/grpc@v1.65.0/server.go:1379 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000428200, {0x2543f00, 0xc0005a6000}, 0xc000e9d560)
google.golang.org/grpc@v1.65.0/server.go:1790 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.65.0/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 184
google.golang.org/grpc@v1.65.0/server.go:1040 +0x125

My elastic cluster is running on 8.15.2, apm-server is also a 8.15.2 version, if it helps.

Thank you for your help :slight_smile: