Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewRelic exporter fails when no service name is provided #964

Closed
pmm-sumo opened this issue Sep 7, 2020 · 2 comments · Fixed by #969
Closed

NewRelic exporter fails when no service name is provided #964

pmm-sumo opened this issue Sep 7, 2020 · 2 comments · Fixed by #969
Labels
bug Something isn't working

Comments

@pmm-sumo
Copy link
Contributor

pmm-sumo commented Sep 7, 2020

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

@pmm-sumo pmm-sumo added the bug Something isn't working label Sep 7, 2020
@pmm-sumo
Copy link
Contributor Author

pmm-sumo commented Sep 7, 2020

@MrAlias saw this on Gitter recently and filled a report to aid with fixing :)

@MrAlias
Copy link
Contributor

MrAlias commented Sep 8, 2020

@MrAlias saw this on Gitter recently and filled a report to aid with fixing :)

Thanks @pmm-sumo !

MrAlias referenced this issue in MrAlias/opentelemetry-collector-contrib Sep 8, 2020
Resolves #964

Validate the Node and ServiceInfo are not nil pointers before
dereferencing them. Additionally, add tests to prevent regression of
this bug.
bogdandrutu pushed a commit that referenced this issue Sep 8, 2020
Resolves #964

Validate the Node and ServiceInfo are not nil pointers before
dereferencing them. Additionally, add tests to prevent regression of
this bug.
dyladan referenced this issue in dynatrace-oss-contrib/opentelemetry-collector-contrib Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants