Migration against the latest version of OpenTracing APIs 0.30.0#11
Conversation
| # Enable custom tracing (Custom annotations for now) | ||
| enableCustomTracing: true | ||
| # Enable custom annotation tracing over a selected set of packages | ||
| enableCustomAnnotationTracingOver: ["com.example"] |
There was a problem hiding this comment.
Just to be sure, we have to a set, at minimum, a path for the custom tracing (com.whatever...). Previously, we were able to activate this by default for all packages. So now, we can't.
I think this version is more robust than the previous one.
There was a problem hiding this comment.
Yes this is it. Actually I figured out that it was not working on all the situations. I decided to make scanned packages declarative then....
| @@ -50,276 +20,12 @@ public class DDSpan implements io.opentracing.Span { | |||
| protected DDSpan( | |||
There was a problem hiding this comment.
Not due to the refactoring, but we don't have public constructor for Span.
Just for information, not sure we want to have one
There was a problem hiding this comment.
I am not sure this is necessary as we want everybody to use the Tracer Builder
|
|
||
| import io.opentracing.BaseSpan; | ||
|
|
||
| @SuppressWarnings("rawtypes") |
There was a problem hiding this comment.
Should we add this suppress where the code is impacted instead of the top of class? Could it be error-prone at the runtime?
There was a problem hiding this comment.
It can but the odds are very smalls. And I don't have a solution to remove these warnings.
| */ | ||
| protected void makeActive(DDActiveSpan activeSpan){ | ||
| //We cannot make active a preably deactivated span | ||
| if(activeSpan!=null && activeSpan.isDeactivated()) |
| @Override | ||
| public DDActiveSpan makeActive(Span span) { | ||
| if(!(span instanceof DDSpan)) | ||
| throw new IllegalArgumentException("Cannot transform a non DDSpan into a DDActiveSpan. Provided class: "+span.getClass()); |
This is a a comprehensive migration that impacted all the rules, contributions, core layers and unit tests. It also fixes some in process propagation issues for some instrumentations.