Closed
Description
Describe the bug
User report on gitter indicated that NewRelic exporter fails. The quick investigation suggests this might happen when Service Name is not provided.
Steps to reproduce
Send a span with no service name
What did you expect to see?
No segfault
What did you see instead?
Segfault
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x28 pc=0x2c86ba3]
goroutine 94 [running]:
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter.exporter.pushTraceData(0xc000498780, 0xc0007e0000, 0x3e8bc00, 0xc0007e7340, 0xc00033fe20, 0x0, 0xc000529688, 0xc42f12)
C:/OpenTelemetryWork/opentelemetry-collector-contrib/exporter/newrelicexporter/newrelic.go:88 +0x423
go.opentelemetry.io/collector/exporter/exporterhelper.(*tracesRequest).export(0xc0004b28e0, 0x3e8bc00, 0xc0007e7340, 0x3e8bc00, 0xc0007e7340, 0xc00055a100)
What version did you use?
Windows, apparently v.0.9.0, though simple change in unit test reproduces this on any platform at master.
What config did you use?
receivers:
otlp/withendpoint:
protocols:
grpc:
endpoint: 127.0.0.1:55680
exporters:
logging:
logLevel: debug
newrelic:
apikey: my-API-key
zipkin:
endpoint: "http://localhost:9411/api/v2/spans"
service:
pipelines:
traces:
receivers: [otlp/withendpoint]
exporters: [logging, newrelic, zipkin]
Environment
OS: any OS
Additional context
It is not entirely clear if a default service name (as it happens for e.g. Zipkin exporter) or no service name needs to be exported in such scenario - maintainer input needed