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

NullPointerException #52

Open
simao opened this issue Jul 9, 2019 · 0 comments
Open

NullPointerException #52

simao opened this issue Jul 9, 2019 · 0 comments

Comments

@simao
Copy link

simao commented Jul 9, 2019

I am getting the following error when using play-zipkin-tracing:

[info]   java.lang.NullPointerException: context == null
[info]   at brave.Tracer.joinSpan(Tracer.java:185)
[info]   at brave.play.ZipkinTraceServiceLike.toSpan(ZipkinTraceServiceLike.scala:173)
[info]   at brave.play.ZipkinTraceServiceLike.toSpan$(ZipkinTraceServiceLike.scala:168)

toSpan uses joinSpan https://github.com/openzipkin-contrib/play-zipkin-tracing/blob/master/play-zipkin-tracing/core/src/main/scala/brave/play/ZipkinTraceServiceLike.scala#L168

But the problem is it also passes contextOrFlags.context() to joinSpan, which might be null if no context was extracted.

Would using nextSpan(contextOrFlags), as suggested in brave, be a better choice?

https://github.com/openzipkin/brave/blob/master/brave/src/main/java/brave/Tracer.java#L160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant