This ensures that `dd-tracng-ot` gets included into shadow jar.
Before this patch it was included only 'by accident' via some
transitive dependencies of some instrumentations.
Or all executors, bypassing the allow list.
`dd.trace.executor=com.MyCustomExecutor,com.OtherExecutor`
`dd.trace.executors.all=true`
Turns out in many cases, executors that we say we’re skipping, are still being traced because they extend from an already instrumented executor.
Ensures that span is closed when Observable is unsubscribed from.
Also added retransform error logger since retransforms might be missed if an exception is thrown, leading to odd behavior.
This change is slightly breaking for existing hystrixCommand code since the resource name changes from run->execute and getFallback->fallback. The fallback span is also now a child of the execute span.
Previously we were inheriting from the parent and also often setting as a tag.
Apply default span assertion to verify the spanType is being checked properly. (Include error state too.)
Should eventually revisit this to try and remove them.
Latest failure was on:
```
at ExecutorInstrumentationTest.#poolImpl '#name' reports after canceled jobs(ExecutorInstrumentationTest.groovy:202)
```
Some executors cannot handle tasks that have been wrapped into
`{Runnable,Callable}Wrapper` because they require certain subclass of
`{Callable,Runnable}` in order to work. We have a test that
effectively disables instrumentation for such executors.
This change makes sure that tasks that do not need to be
wrapped (which essentially means anything that is not lambda) still
get traced in such executors. One notable example of affected executor
type is `ScheduledThreadPoolExecutor`.
It turns out closing continuation also closes parent span. This is not
very good in cases when we end up not using continuation if
continuation in a state has already been setup.
This patch provides way to close continuation in a way that doesn't
affect parent scope.
It was only working because it extends from ThreadPoolExecutor, but it uses a backing queue type that is incompatible. Scheduled execution submits to the work queue directly and will bypass the exisiting instrumentation.