-
Notifications
You must be signed in to change notification settings - Fork 181
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
fix: handle null parent spans in asChildOf calls #2167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our call sites guard against calling this method with null
. Can you update these to avoid the double null check in TracingHttpServiceFilter and TracingHttpRequesterFilter?
...-inmemory/src/main/java/io/servicetalk/opentracing/inmemory/AbstractInMemorySpanBuilder.java
Outdated
Show resolved
Hide resolved
there are some check style issues related to import ordering. You can also run
|
Motivation: The opentracing apis state that when calling the asChildOf methods with null parameters they should behave as no-ops. The existing code was throwing null pointers in these cases ref: https://github.com/opentracing/opentracing-java/blob/master/opentracing-api/src/main/java/io/opentracing/Tracer.java#L150 Modifications: - treat null values in childOf calls as no-ops Result: Our tracer implementation adheres to the opentracing apis
51487ee
to
b7473a2
Compare
thanks @eddie4941 ! |
Motivation:
The opentracing apis state that when calling the asChildOf methods with
null parameters they should behave as no-ops. The existing code was
throwing null pointers in these cases
ref: https://github.com/opentracing/opentracing-java/blob/master/opentracing-api/src/main/java/io/opentracing/Tracer.java#L150
Modifications:
Result:
Our tracer implementation adheres to the opentracing apis