Nikolay Martynov
65cb8af873
Fix tests that verify that cancelling job cancels continuation
2019-02-28 18:44:39 -05:00
Tyler Benson
50279d64fe
Span type should only be an attribute and not inherited
...
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.)
2019-02-28 12:39:51 -08:00
Tyler Benson
d53d3fe4c8
Add @Retry to tests that fail randomly in CI.
...
Should eventually revisit this to try and remove them.
Latest failure was on:
```
at ExecutorInstrumentationTest.#poolImpl '#name' reports after canceled jobs(ExecutorInstrumentationTest.groovy:202)
```
2019-02-27 20:56:47 -08:00
Tyler Benson
c46909e59f
Migrate JDBC instrumentation to Decorator
2019-02-26 11:16:35 -08:00
Nikolay Martynov
bae2d7dde8
Allow non-wrapped tasks in disabled executors
...
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`.
2019-02-11 11:47:34 -05:00
Nikolay Martynov
3a0a471dd5
Close future's continuation on cancel even if future itself was not cancelled
2019-02-08 20:13:32 -05:00
Nikolay Martynov
f8aed7aec7
Provide seprate instrumentation names for Akka and Scala ForkJoin instrumentations
2019-01-28 11:29:59 -05:00
Nikolay Martynov
f7844f763c
Instrument Akka and Scala ForkJoinTask and ForkJoinPool
2019-01-25 16:15:48 -05:00
Nikolay Martynov
6ab5b121f5
Handle ForkJoinTask in concurrent instrumentation
2019-01-24 17:28:00 -05:00
Nikolay Martynov
af15b17f1c
Remove unnecessary helper from FutureInstrumentation
2019-01-23 22:31:59 -05:00
Marco Ferrer
5096ac35b6
address ci errors
2019-01-21 14:12:44 -05:00
Marco Ferrer
d7319cd76d
add tests for kt cancellation and channels
2019-01-21 11:59:54 -05:00
Marco Ferrer
a31abc67e9
add support for instrumenting kotlin coroutine schedulers
2019-01-09 19:04:42 -05:00
Nikolay Martynov
354cbfcb2d
Concurent instrumentation tests: block thread before starting tracing
...
Otherwise blocking thread is pretty much useless since we may still
get spans if threads are executed quickly enough.
2019-01-08 12:30:18 -05:00
Tyler Benson
fe52180bfc
Apply proper generic signature for Instrumenter.Default transformers()
...
Previously it was missing the MethodDescription portion.
2019-01-04 15:25:12 -08:00
Nikolay Martynov
2e9b20ceb5
Remove unused variable from AsyncChild classes
2018-12-05 11:53:19 -05:00
Nikolay Martynov
2e8dc9d08f
Fix Ratpack tests that got broken by ExecutorInstrumentation refactoring
...
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.
2018-11-29 15:21:46 -08:00
Nikolay Martynov
4ec5ca394c
Add code to wrap future returned by submit(Runnable) call
2018-11-29 15:18:46 -08:00
Nikolay Martynov
ad98ebc01f
Add some comments and some other minor CR tweaks
2018-11-29 15:18:46 -08:00
Nikolay Martynov
118a61cc67
Add field backed context provider
2018-11-29 15:18:46 -08:00
Nikolay Martynov
b89e73b3c0
Switch executor instrumentation to use context storage
2018-11-29 15:18:46 -08:00
Tyler Benson
468ccab99a
Improve error handling for ThreadPoolExecutorInstrumentation
...
If other exceptions are thrown when trying to test the queue, it generates lots of log noise. This should handle it better.
2018-11-27 11:28:44 -08:00
Tyler Benson
cbb29069fe
Apply component tag more consistently
2018-11-14 11:31:40 -08:00
Nikolay Martynov
9c652cc5b2
Remove duplicate class names from ExecutorInstrumentation
2018-11-05 12:55:32 -05:00
Nikolay Martynov
aba0c3377d
Use offer instead of add when trying to test-insert element into the queue on ThreadPoolExecutor instrumentation
2018-10-24 15:13:40 -04:00
Tyler Benson
432ce89a07
Add assertTraces to AgentTestRunner with implied argument
...
This will also help with auto complete when writing tests.
2018-10-15 10:19:00 +10:00
Tyler Benson
2174f21d61
Allow executor tracing to flow across distinct executors
...
Otherwise any async work is lost after the first executor jump.
2018-09-21 11:12:19 +10:00
Tyler Benson
72b2873ec1
ScheduledThreadPoolExecutor doesn’t actually work separately
...
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.
2018-09-20 16:33:49 +10:00
Tyler Benson
3d78afbc2c
Disable Executor instrumentation ThreadPoolExecutor instances
...
If we can’t add generic runnables to the queue.
This won’t solve the problem for all cases, but it will help with some.
Tests forthcoming.
2018-09-20 16:06:01 +10:00
Tyler Benson
898647e000
Allow trace to persist across netty connect.
...
Also create span with error on connection failure.
Add tests for connection failure.
2018-08-22 09:45:33 +10:00
Tyler Benson
3f2ec7dc48
Move to separate packages
2018-08-16 12:24:27 +10:00
Tyler Benson
4583d12b31
Cleanup method signatures and servlet 2 instrumentation
...
adding the abstract servlet instrumentation reduces code duplication and makes it more similar to servlet 3 instrumentation.
2018-08-13 15:14:10 +10:00
Nikolay Martynov
6bc1d1ab8e
Implement `saveHasSuperType` and use it instead of `hasSuperType`
...
The idea is to just 'trim' type hierarchy 'up-trees' that we cannot
resolve dring instrumentation instead of failing to instrument completely.
2018-07-31 20:13:59 -04:00
Tyler Benson
51919a77bb
Apply formatter on java files.
2018-07-31 12:07:43 +10:00
Tyler Benson
bc3af56b08
Apply formatter on scala files.
2018-07-31 12:07:30 +10:00
Nikolay Martynov
44b364332a
Remove unused field and method
2018-07-26 10:11:20 -04:00
Andrew Kent
02a3e6a5d3
New Instrumentation API
2018-07-06 17:17:32 -04:00
Nikolay Martynov
93a41b5064
Fix some typos
2018-06-06 20:47:49 -04:00
Nikolay Martynov
7a280d7e13
Fix some code formatting
2018-06-06 17:11:17 -04:00
Nikolay Martynov
ca6fabfd64
Move code from `WrapAdviceUtils` to `DatadogWrapper`
2018-06-06 16:42:23 -04:00
Nikolay Martynov
5f82776fc5
Use assertTraces api in slick tests
2018-06-06 16:41:03 -04:00
Nikolay Martynov
d6aaee1bee
Check for java concurrent classes prefixes match only if class was not whitelisted already
2018-06-06 15:51:30 -04:00
Nikolay Martynov
bbcc2882ab
Use test set instead of submodule for Slick tests
2018-06-06 15:49:39 -04:00
Nikolay Martynov
f92af7d860
Fix Scala Slick instrumentation
2018-06-06 10:43:23 -04:00
Andrew Kent
1641c54448
Skip instrumenting slick thread pool
2018-05-18 11:17:27 -07:00
Tyler Benson
d5d24c50c7
Replace @Unroll’s with a rule to always unroll.
2018-05-10 15:24:59 +10:00
Tyler Benson
f35e2e6ebe
Remove various warnings and other cleanup
...
Also upgrade some plugins.
2018-05-04 14:05:06 +10:00
Tyler Benson
7c4d42ef8a
Add additional test task for testing latest versions of a dependency
2018-05-04 14:04:30 +10:00
Tyler Benson
0f77ccd797
Merge pull request #297 from DataDog/tyler/kafka
...
Add null check to kafka
2018-05-02 08:06:37 +10:00
Andrew Kent
3c7d4f5b13
Enable executor instrumentation by default
...
Executor instrumentation does not need to be turned off by default
because the instrumentation will not apply unless the TraceScope is
activated.
2018-04-30 17:27:51 -07:00