Commit Graph

987 Commits

Author SHA1 Message Date
Nikolay Martynov 997832ba4e Limit hibernate integration tests to 5.x.x since we do not support 6+ 2019-04-05 10:43:16 -04:00
Nikolay Martynov 93621fac17 Specify hibernate latest dep test deps for 4.0 tests 2019-04-05 09:26:14 -04:00
Nikolay Martynov c104be1fa7 Add compile dep on scala to make Idea happy 2019-04-03 13:59:25 -04:00
Nikolay Martynov e3488d23a2 Netty: do not use deprecated constants 2019-04-03 13:58:54 -04:00
Nikolay Martynov a245ec4949 Upgradle gradle 2019-04-03 12:56:15 -04:00
Nikolay Martynov de980c2d52
Merge pull request #787 from DataDog/mar-kolya/compiler-config-fix
Mar kolya/compiler config fix
2019-04-01 09:15:39 -04:00
Nikolay Martynov 212d4d3c71 Provide Java compiler with bootstrap classes for Java7
when compiling Java7-compatible sources.
2019-03-29 13:53:53 -04:00
Luca Abbati 2c282552dc
Fix comment 2019-03-29 17:26:43 +01:00
Luca Abbati ff17ed166b
Fix code style in cassandra integration 2019-03-29 16:38:32 +01:00
Luca Abbati dfecfc8329
Fixed typo in comments (follow-up) 2019-03-29 14:15:25 +01:00
Luca Abbati 1e69fb7234
Have cassandra integration to work with recent versions of Guava.
Recent versions of Guava removed method 'Futures::transform(input, function)' in favor of 'Futures::transform(input, function, executor)'.
This commit manually retrieve the executor as it was done in Guava 20 in the overloaded method.
See: 65f6b4f4b1/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java (L58)
2019-03-29 13:42:46 +01:00
Nikolay Martynov 3b0e769e88 Fix helper injection in context provider
Currently helpers will not be injected if instrumentation doesn't
apply. Unfortunately it is possible for some classes to have context
fields added even if instrumentation is not allied (i.g. instrumented
classes are not used). Fix this by always injecting all helpers if we
inject context fields.
2019-03-26 15:53:34 -04:00
Tyler Benson 004c44d70c Add tests confirming that Spring Data Repos aren’t working
The hibernate instrumentation doesn’t seem to work with Spring Data JPA.
2019-03-25 11:58:16 -07:00
Tyler Benson a73b8c36f0 Review changes. 2019-03-25 09:56:05 -07:00
Tyler Benson 63b5c094e7 Fix NPE in hibernate instrumentation
Also add each hibernate instrumentation project as a test dependency to the others.  This demonstrates a problem with muzzle and instrumentation context which currently causes the tests to fail.
2019-03-22 17:06:19 -07:00
Tyler Benson b22b11b9b0 Add timeout test for V2
Also make sure span is closed on error.
2019-03-21 18:08:35 -07:00
Tyler Benson 8d96729ae8 Fix instrumentation and add tests to verify. 2019-03-21 18:08:35 -07:00
Nikolay Martynov 3a3705f708 AWS v0: Close span non AWS SDK errors
Looks like AWS SDK doesn't call interceptor when non-sdk exception
occurs. This leads to leaking open spans. Fix that by instrumenting
http client.

Note: currently has no tests.
2019-03-21 18:08:35 -07:00
Tyler Benson e0d95ceb19 Fix cassandra supported version
and limit range check to <4.
The latest release (4.0) is not compatible with our instrumentation.
2019-03-21 17:57:08 -07:00
Will Gittoes af0f37861b
Support Hibernate 3.3 2019-03-21 13:38:16 +11:00
Will Gittoes c369fafe8c
Support muzzle testInverse = true 2019-03-21 12:17:24 +11:00
Will Gittoes f94f22bcba
Dont load hibernate instrumentation unless correct version of hibernate is on the classpath 2019-03-20 15:52:49 +11:00
Will Gittoes 8c5158f8e9
Restructure hibernate integration 2019-03-20 11:00:42 +11:00
Will Gittoes 4825a113f8
Add a couple of comments about the code structure 2019-03-19 16:28:27 +11:00
Will Gittoes b60c3bcc0a
Decouple common utils used in hibernate tracing from any specific version of hibernate 2019-03-19 14:40:16 +11:00
Will Gittoes 86d14280d2
Exclude hibernate-annotations from 3.5 latestDepTest 2019-03-19 09:56:39 +11:00
Will Gittoes 3b6c688ce8
Support Hibernate 3.5 2019-03-19 09:56:39 +11:00
Will Gittoes 5a04c58c55
Merge pull request #765 from DataDog/willgittoes-dd/hibernate-5
Add support for Hibernate 4.3+ ProcedureCall
2019-03-19 09:56:03 +11:00
Nikolay Martynov 63e0c0f032 Support Unix Domain Socket proxy to send traces 2019-03-15 11:36:44 -07:00
Will Gittoes 30401bfed8
Fix test 2019-03-13 14:20:58 +11:00
Will Gittoes 54401083ce
Fix version of hsqldb 2019-03-13 14:09:49 +11:00
Will Gittoes 474f196c2f
fix style 2019-03-13 13:57:05 +11:00
Will Gittoes 2ceeb4dc14
Additional instrumentation for hibernate 4.3 and 5.x onwards 2019-03-13 13:52:33 +11:00
Tyler Benson ca708db5da Remove trace injection into AWS requests
I don’t think these are helping us and we may still risk messing up the signed request if this happens too late.
2019-03-12 14:08:27 -07:00
Tyler Benson bb7923571e
Merge pull request #764 from DataDog/tyler/memcache-decorator
Migrate Memcache instrumentation to Decorator
2019-03-12 14:01:47 -07:00
Tyler Benson bca5614508 Migrate Memcache instrumentation to Decorator 2019-03-12 11:47:25 -07:00
Tyler Benson d30d715dc8 Migrate Spring Web{flux} instrumentation to Decorator 2019-03-12 09:38:53 -07:00
Tyler Benson d31965ff5a
Merge pull request #761 from DataDog/tyler/rabbit-decorator
Migrate RabbitMQ instrumentation to Decorator
2019-03-12 08:08:22 -07:00
Will Gittoes 736f1787cc
Merge pull request #703 from DataDog/willgittoes-dd/hibernate-integration
Hibernate integration
2019-03-12 15:00:04 +11:00
Will Gittoes a3925b556c
Get rid of unneeded try/catch block 2019-03-12 14:07:37 +11:00
Tyler Benson 817f5e3f8e
Merge pull request #762 from DataDog/tyler/play-decorator
Migrate Play instrumentation to Decorators
2019-03-11 19:27:03 -07:00
Tyler Benson 69d31cc03a
Restrict derby version
Lastest version requires Java 9+, so we can’t test against it for now.
2019-03-12 11:52:39 +11:00
Will Gittoes e1915c35bf
Merge fixes for Hibernate 2019-03-12 10:46:30 +11:00
Will Gittoes bf110640e8
Merge branch 'master' into willgittoes-dd/hibernate-integration 2019-03-12 09:39:58 +11:00
Tyler Benson ee1d385c7b Restrict derby version
Lastest version requires Java 9+, so we can’t test against it for now.
2019-03-11 14:27:10 -07:00
Tyler Benson d90a3c47ae Restrict derby version
Lastest version requires Java 9+, so we can’t test against it for now.
2019-03-11 14:26:58 -07:00
Tyler Benson 2146678d0a Migrate RabbitMQ instrumentation to Decorator 2019-03-11 14:09:06 -07:00
Tyler Benson b8affc472d Migrate Play instrumentation to Decorators 2019-03-11 11:54:28 -07:00
Will Gittoes 81f78db0ff
Support hibernate 4.0 2019-03-11 17:22:05 +11:00
Will Gittoes 600f2e267f
Enable integration for hibernate 4.3 2019-03-11 16:20:27 +11:00
Will Gittoes b40483c974
Add "hibernate" as the primary instrumentation name 2019-03-11 14:07:26 +11:00
Tyler Benson c500d4b236 Migrate OkHttp Instrumentation to Decorators 2019-03-08 15:12:29 -08:00
Tyler Benson 576e554445 Migrate Mongo to Decorator 2019-03-05 20:50:06 -05:00
Will Gittoes 7ed7ce7518
Fix muzzle 2019-03-06 10:39:46 +11:00
Will Gittoes 01f4666ac4
Simplify testing multiple session implementations 2019-03-06 10:28:18 +11:00
Will Gittoes e05429a9ff
Rename to hibernate-5 2019-03-06 10:12:52 +11:00
Will Gittoes 00865dab88
Review comments: Replace un-needed instrumentation by just propagating scope not spans 2019-03-06 10:05:21 +11:00
Nikolay Martynov d054790161
Merge pull request #754 from DataDog/mar-kolya/increase-docker-timeout
Increase docker container timeout in tests to help with stability on …
2019-03-04 14:40:27 -05:00
Nikolay Martynov 9272f88fe6 Increase docker container timeout in tests to help with stability on underpowered machines running builds 2019-03-04 11:59:41 -05:00
Tyler Benson 084c2eb51f Migrate Netty instrumentation to Decorator 2019-03-04 08:16:25 -08:00
Will Gittoes 9e3fda549d
More codenarc fixes 2019-03-01 13:53:51 +11:00
Will Gittoes 644d26f4a9
Change muzzle tests 2019-03-01 12:53:51 +11:00
Tyler Benson e098e6bd64 Migrate kafka instrumentation to Decorator. 2019-02-28 16:27:31 -08:00
Will Gittoes e6d593eabe
JAXB deprecated from default Java classpath in later JVMs, but required for tests 2019-03-01 10:49:49 +11:00
Nikolay Martynov 65cb8af873 Fix tests that verify that cancelling job cancels continuation 2019-02-28 18:44:39 -05:00
Tyler Benson 339784c4eb
Merge pull request #744 from DataDog/tyler/jms-decorator
Migrate JMS instrumentation to Decorator
2019-02-28 15:32:31 -08:00
Tyler Benson 1f60904321
Merge pull request #743 from DataDog/tyler/jetty-decorator
Migrate Jetty instrumentation to Decorator
2019-02-28 14:59:45 -08:00
Will Gittoes afc517f0c3
Review comments 2019-03-01 09:42:07 +11:00
Tyler Benson fc40c9617a Migrate JSP instrumentation to Decorator
Remove span kind and type from generated spans since these classify more as specialized @Trace spans.
2019-02-28 14:30:28 -08:00
Tyler Benson 5668e6006f Migrate Jetty instrumentation to Decorator 2019-02-28 13:54:37 -08:00
Tyler Benson 50b4e1623e Migrate JMS instrumentation to Decorator 2019-02-28 13:52:29 -08: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
Nikolay Martynov 3029d3d85c
Merge pull request #741 from DataDog/mar-kolya/tomcat-classloadin-instrumentation
Add instrumentation for Tomcat webapp classloading
2019-02-28 13:48:40 -05:00
Nikolay Martynov aa031cc708 Add instrumentation for Tomcat webapp classloading 2019-02-28 12:58:08 -05: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
Will Gittoes 093387bb01
Review comments and additional testing 2019-02-28 11:04:31 +11:00
Tyler Benson 9c9e74e0d0 Missing helpers 2019-02-27 13:37:03 -08:00
Tyler Benson a413b0d08d Review changes. 2019-02-27 12:39:03 -08:00
Tyler Benson 1644de3969 Migrate Jax-rs client instrumentation to Decorator 2019-02-27 09:40:08 -08:00
Tyler Benson 4e9449db81 Migrate Jax-rs annotation instrumentation to Decorator 2019-02-27 09:40:08 -08:00
Tyler Benson cd9dc94b24 Migrate Hystrix instrumentation to Decorator 2019-02-27 09:40:08 -08:00
Tyler Benson 34242e4849 Migrate method tracing instrumentation to Decorator 2019-02-27 09:40:08 -08:00
Tyler Benson d842612697 Migrate Jedis/Lettuce instrumentation to Decorator 2019-02-27 09:04:52 -08:00
Will Gittoes c0e5baebda
Support stored procedures 2019-02-27 16:17:27 +11:00
Will Gittoes 044ff75e07
Neaten decorator pattern a bit 2019-02-27 09:35:10 +11:00
Tyler Benson c46909e59f Migrate JDBC instrumentation to Decorator 2019-02-26 11:16:35 -08:00
Tyler Benson 99f2d97cd5 review fixes 2019-02-26 08:32:43 -08:00
Tyler Benson a33b6ddaa0 Implement trace origin header and propagation support 2019-02-26 08:26:31 -08:00
Tyler Benson e17e029540
Merge pull request #732 from DataDog/tyler/httpurlconnection-decorator
Migrate HttpURLConnection instrumentation to Decorator
2019-02-26 08:13:46 -08:00
Tyler Benson 0aba752787
Merge pull request #726 from blockmar/hystrix-tags
Hystrix metadata added to tags and Command Group included in resource name
2019-02-26 08:05:56 -08:00
Will Gittoes 079fcd6a56
Use a Dectorator for the Hibernate instrumentation 2019-02-26 17:31:42 +11:00
Will Gittoes 8985d6fd07
Merge branch 'master' into willgittoes-dd/hibernate-integration 2019-02-26 12:03:08 +11:00
Will Gittoes 8ffb9a63b0
Add hibernate.Criteria instrumentation 2019-02-26 12:02:40 +11:00
Tyler Benson 678df7b43d Migrate HttpURLConnection instrumentation to Decorator 2019-02-25 14:48:15 -08:00
Tyler Benson adb2eb9b55 Migrate gRPC instrumentation to Decorator 2019-02-25 13:17:28 -08:00
Anders Blockmar 8d601b7f0d Get methodName directly by annotation. Applied Google formatting. 2019-02-25 09:45:10 +01:00
Will Gittoes b95ff2eb8e
Hibernate: instrument querying 2019-02-25 10:17:14 +11:00
Tyler Benson 2f3f2d4e04
Merge pull request #728 from DataDog/tyler/static-import-decorators
Rename and static import decorators instance
2019-02-22 15:51:21 -08:00
Tyler Benson 461e01270c
Merge pull request #729 from DataDog/tyler/license-cleanup
Remove unnecessary license checker
2019-02-22 15:28:02 -08:00
Tyler Benson 93e38f6f0d Rename and static import decorators instance
In the instrumentation it reads better.
2019-02-22 13:44:34 -08:00
Tyler Benson 7e82f5b197 Remove unnecessary license checker 2019-02-22 13:42:43 -08:00
Tyler Benson db47fde8d1 Group Elasticsearch instrumentation into common folder
Also migrate to decorator.
2019-02-22 13:28:11 -08:00
Tyler Benson f04d113ecb Make decorators public and add tests 2019-02-22 09:42:53 -08:00
Anders Blockmar 5c9ddd6923 POC for hystrix metadata as tags in Hystrix Instrumentation 2019-02-22 15:59:32 +01:00
Tyler Benson dd35372a72 Add Cassandra decorator 2019-02-21 15:43:12 -08:00
Tyler Benson 9c8e689b6d Add decorator for couchbase instrumentation 2019-02-21 15:27:26 -08:00
Tyler Benson 8f9ea87ef6
Merge pull request #723 from DataDog/tyler/aws-decorators
Migrate AWS SDK instrumentation to decorators
2019-02-21 12:37:05 -08:00
Tyler Benson 0d9e6ad97a
Merge pull request #722 from DataDog/tyler/akka-apache-decorators
Akka and Apache HttpClient migrate to decorators
2019-02-21 12:27:53 -08:00
Tyler Benson fb304a110d Migrate AWS SDK instrumentation to decorators 2019-02-21 12:11:42 -08:00
Tyler Benson dfe5cb57b2 Servlet migrate to decorators 2019-02-20 17:35:41 -08:00
Tyler Benson 13e708ec42 Akka and Apache HttpClient migrate to decorators 2019-02-20 17:02:05 -08:00
Tyler Benson a98c22ac3a Introduce base decorators 2019-02-20 16:11:18 -08:00
Tyler Benson a7ebc9b3db Deprecate WEB_SERVLET type 2019-02-20 08:42:39 -08:00
Nikolay Martynov dd7981871f Limit ES-rest tests to 6.x.x versions
It looks like beta 7.x.x was released and our instrumentation doesn't
work with it at the moment.
2019-02-14 17:43:44 -05:00
Nikolay Martynov 8e1382b4e4 Improve webflux integration
Add support for tracing Mono/Flux
2019-02-14 16:59:59 -05:00
Nikolay Martynov 13005d72cb Add reactor-core instrumentation 2019-02-14 16:59:56 -05:00
Will Gittoes 7481a141c4
Added instrumentation to attach State to all Query objects, so they can be instrumented 2019-02-13 22:13:32 +11:00
Will Gittoes b68563f5d1
Make tests work for StatelessSession as well as Session 2019-02-13 15:08:53 +11:00
Tyler Benson e019fcbda5 Instrument SharedSessionContract instead of Session 2019-02-12 16:53:09 -08:00
Will Gittoes 180ba619a2
Move SessionFactory instrumentation into its own class 2019-02-13 10:32:09 +11:00
Will Gittoes 984f6aff68
Tests for Session methods 2019-02-12 17:22:43 +11:00
Will Gittoes cd2467c76b
Use a generic Session MethodAdvice to instrument all synchronous Session methods; also support re-entrant Session methods 2019-02-12 17:01:37 +11: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
Will Gittoes 724a59c347
Get initial hibernate tests working 2019-02-11 20:55:28 +11:00
Will Gittoes e8f0eaf85e
Add basic Hibernate integration 2019-02-11 14:47:21 +11: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 931e6ff8af
Merge pull request #688 from DataDog/mar-kolya/webflux-fixes
Fix webflux integration to not rely in active span
2019-02-07 12:45:50 -05:00
Nikolay Martynov a46d6a2e8f Use config inheritance in `withConfigOverride`.
This moves us forward to abstract 'Config' and away from depending in
specific config data source (e.g. system properties).
2019-02-05 15:51:05 -05:00
Tyler Benson 12e7efc0b9 Review fixes 2019-02-05 11:58:36 -08:00
Tyler Benson bbcd2f6949 Move other Utils to utils package 2019-02-05 11:43:05 -08:00
Tyler Benson 6aa371d790 Encapsulate config override reflection 2019-02-05 11:30:07 -08:00
Tyler Benson 6cebabbada Move integrations config to Config class. 2019-02-05 08:20:49 -08:00
Tyler Benson 1a54e8179a Add setting to set service name by domain for http clients
This will allow better metric collection and identification of trends for individual services/hosts.

This is not enabled by default because it can result in a high cardinality of services.
2019-02-05 08:20:49 -08:00
Nikolay Martynov a086f38f2f Fix webflux integration to not rely in active span
Netty event loop instrumentation doesn't allow us to attribute work to
correct span so we have to maintain that manually.
2019-02-05 10:38:21 -05:00
Nikolay Martynov f84e510f3e Increase timeouts in JMS test to try to make it more stable 2019-02-05 10:10:49 -05:00
Nikolay Martynov b25784e7a2 Make test results in netty-4.0 client tests more readable 2019-02-04 15:39:42 -05:00
Will Gittoes 99e4e52600
Fix style 2019-02-01 09:29:05 +11:00
Will Gittoes a44b59bb14
Hard-code Hystrix operation (span) name, leaving the resource name dynamic 2019-01-31 14:30:08 +11:00
Will Gittoes 57bae1688e
Review comments 2019-01-31 09:15:30 +11:00
Will Gittoes 56aaccb0c2
Remove commented code 2019-01-30 17:42:41 +11:00
Will Gittoes f15a2ffd79
Add support for ES rest client 6.3 and above 2019-01-30 17:39:20 +11:00
Nikolay Martynov ee3788bfdc
Merge pull request #672 from DataDog/mar-kolya/more-forkjoin-instrumentations
More ForkJoin instrumentations
2019-01-28 14:01:03 -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 a3219639a0 netty 4.0: improve request uri parsing 2019-01-25 15:58:25 -05:00
Nikolay Martynov d4943eb2b6 netty 4.0: do not modify headers in aws request 2019-01-25 15:58:22 -05:00
Nikolay Martynov 5029660418 netty 4.0: consolidate netty config names 2019-01-25 15:50:28 -05:00
Nikolay Martynov b3ad700b34
Merge pull request #666 from DataDog/mar-kolya/aws-sdk2
Initial AWS2 SDK instrumentation
2019-01-25 13:01:32 -05:00
Nikolay Martynov a0dee2cd88
Merge pull request #674 from DataDog/mar-kolya/catch-exception-in-servlet-context-getter
Catch exception in servlet context getter.
2019-01-25 12:55:32 -05:00
Nikolay Martynov 4fb94b8368 AWS2 SDK: Remove class loader matcher that is no longer needed 2019-01-25 12:53:00 -05:00
Nikolay Martynov 4ba0adfab3 Catch exception in servlet context getter.
Request may finish after check has been perform but before context has
been read leading to exception in some implementations.
2019-01-25 12:28:58 -05:00
Nikolay Martynov 62402a6426 AWS SDK2 instrumentation 2019-01-25 12:02:31 -05:00
Nikolay Martynov 04fbb5085f Improve OSGi class loader instrumentation
It turns out that Eclipse's OSGi implementation has two problems:
* It doesn't respect system properties by default
* It has tricky classloader implementation that loads bootstrap
  classes from the classloader-has-delegation-to-bootstrap check but
  doesn't load bootstrap classes from 'normal' code.

This should address second problem and make Eclipse's OSGi
implementation 'safe' by default.
2019-01-25 08:52:07 -05:00
Nikolay Martynov 76999fc9f9 Improve AWS1.x SDK integration
For AWS11.x SDK make sure that http client span is actually a child of
aws span.
2019-01-24 17:28:03 -05:00
Nikolay Martynov 7b0e3ffd1c netty 4.1: consolidate netty config names 2019-01-24 17:28:03 -05:00
Nikolay Martynov cb1313ea9a netty 4.1: do not modify headers in aws request 2019-01-24 17:28:03 -05:00
Nikolay Martynov 07d10e2374 netty 4.1: improve request uri parsing 2019-01-24 17:28:03 -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
Tyler Benson 0a89074f60
Merge pull request #653 from marcoferrer/instrument-kt-coroutine-scheduler
Add support for instrumenting kotlin coroutine schedulers
2019-01-22 10:31:32 -08:00
Marco Ferrer 5096ac35b6 address ci errors 2019-01-21 14:12:44 -05:00
Marco Ferrer 7819430620 add mavenCentral to plugin repos 2019-01-21 12:26:46 -05:00
Marco Ferrer d7319cd76d add tests for kt cancellation and channels 2019-01-21 11:59:54 -05:00
Andrew Kent 5f70ebfec5
Merge pull request #657 from DataDog/ark/fix-log-manager-test-race-condition
Play nice with Java's LogManager across all JVMs
2019-01-18 19:50:12 +00:00
Tyler Benson fe3ebceba9 Add jackson smile dep for old ES tests. 2019-01-16 13:27:04 -05:00
Andrew Kent 6ffaa9e04f Remove jre logging integration 2019-01-16 08:59:10 -08:00
Nikolay Martynov 1b1f620318 Improve Vertx test stability
By actiually waiting for test server to start listening.
2019-01-11 12:14:17 -05:00
Marco Ferrer 63c28cef31 add kotlin test config to java-concurrent project 2019-01-09 19:20:31 -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
Nikolay Martynov 06bd670f0a Remove unused class 2019-01-08 12:30:10 -05:00
Nikolay Martynov 93b018b4cc Use port 61 for unused port in akka tests
This port is in low range and is not assigned so nothing should really
be listening on it on any host.
2019-01-08 12:04:50 -05:00
Tyler Benson 7da0cc7f50
Merge pull request #645 from DataDog/tyler/instrumenter-signature
Apply proper generic signature for Instrumenter.Default transformers()
2019-01-07 14:18:52 -08:00
Tyler Benson c18b299606 Also exclude test coverage from instrumentation 2019-01-04 15:25:36 -08:00
Tyler Benson 6d7415fed2 Don’t run coverage on projects that use shadow
It was breaking on dd-java-agent where it has duplicate classes across different jars.  These projects are excluding everything anyway.
2019-01-04 15:25:36 -08: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
Tyler Benson 93116e4e12 Avoid downloading so many AWS dependencies for the entire SDK
Only specify the deps we need for the tests.
2019-01-04 13:42:51 -08:00
Nikolay Martynov d02e0d8e47 Fix akka latest dep test failure 2019-01-03 19:13:48 -05:00
Nikolay Martynov ad2d5d6cb7
Merge pull request #638 from DataDog/mar-kolya/fix-akka-101
Fix Akka 10.1 support
2018-12-28 13:30:42 -05:00
Nikolay Martynov be919a0145 Fix Akka 10.1 support 2018-12-28 13:12:33 -05:00
Tyler Benson 82dcc3ce6c
Merge pull request #629 from DataDog/ark/jmx-tagging
Add languages tag to jmx/runtime tags
2018-12-28 09:34:20 -08:00
Tyler Benson 8b910b46d1 Update tests for `language` tag in root span 2018-12-27 16:00:47 -08:00
Tyler Benson 3ef347f00f Use safeHasSuperType instead of isSubTypeOf 2018-12-27 10:33:43 -08:00
Tyler Benson 471d8c4410 Properly capture callable statement queries
CallableStatement is a sub type of PreparedStatement.  Previously we were only matching methods that returned exactly PreparedStatement.
2018-12-21 14:03:33 -08:00
Andrew Kent e9f1436522 Additional continuable-scope tests 2018-12-19 17:12:58 -08:00
Andrew Kent 2861d87071 slf4j MDC autoinjection integration 2018-12-19 17:09:00 -08:00
Andrew Kent 4dc3528097 Add post-match hook to default instrumenter api 2018-12-19 17:07:43 -08:00
Andrew Kent 0b92413d4a Move JvmBootstrapTest into a fork inside a groovy test 2018-12-12 20:17:48 -08:00
Andrew Kent d0120b9419 Assert logger constructor exists before applying instrumentation
This adds muzzle functionality to the logger
instrumentation. Assertions are manually set up because auto-creation
of references is not possible for non-default instrumenters.
2018-12-12 20:01:52 -08:00
Andrew Kent 0240ad5154 Move default instrumentation declarations to Instrumenter.Default 2018-12-11 18:01:40 -08:00
Andrew Kent 1004ee4ef7 Patch java.util.logging.Logger for safe use with jmxfetch 2018-12-11 17:26:02 -08:00
Gary Huang 70b60939f4
Merge pull request #622 from DataDog/gary/fix-ratpack-test
Fix Flaky Ratpack Fork Test
2018-12-09 15:27:44 -05:00
Gary Huang a04b30107f
Change scope handling 2018-12-07 12:40:18 -05:00
Nikolay Martynov cb419997af
Merge pull request #623 from DataDog/mar-kolya/jms-test-improvements
Small improvement for jms tests to hopefully make them more stable
2018-12-07 11:58:29 -05:00
Nikolay Martynov c1e21e328b Small improvement for jms tests to hopefully make them more stable 2018-12-07 09:40:29 -05:00
Gary Huang 26c354dad2
Fix Flaky Ratpack Fork Test
Ratpack tests occasionally fail with the handler span and manually started span out of order. This will ensure that if a span is manually started inside of the handler then it will be finished after the handler span is finished, which is when the request has been responded to.
2018-12-07 00:49:37 -05:00
Gary Huang 2c85b5cbb8
Restore RabbitMQ latestDepTest to use latest version
Since spring-rabbit no longer uses a dependency with a snapshot build.
2018-12-07 00:16:03 -05:00
Nikolay Martynov 30712cdc87
Merge pull request #617 from DataDog/mar-kolya/java-concurrent-test-cleanup
Remove unused variable from AsyncChild classes
2018-12-05 12:35:19 -05:00
Nikolay Martynov 2e9b20ceb5 Remove unused variable from AsyncChild classes 2018-12-05 11:53:19 -05:00
Tyler Benson 94a3f7bb2b
Merge pull request #616 from DataDog/tyler/grpc
Enable gRPC instrumentation by default.
2018-12-04 14:28:58 -08:00
Nikolay Martynov 7cd3438d6b
Merge pull request #613 from DataDog/mar-kolya/improve-httpurl-connection
Improve HttpUrlConnection instrumentation
2018-12-04 17:12:01 -05:00
Tyler Benson 43e8c70098 Enable gRPC instrumentation by default. 2018-12-04 14:11:57 -08:00
Nikolay Martynov 0a3ecc1b90 Improve HttpUrlConnection instrumentation
Make sure we get one span per request
2018-12-04 16:54:48 -05:00
Tyler Benson 6cb9e0360d
Merge pull request #612 from DataDog/tyler/jms
Remove duplicate JMS spans from nested calls.
2018-12-04 11:25:56 -08:00
Tyler Benson 013e57c677 Add tests for Spring JMS Template 2018-12-04 10:54:53 -08:00
Nikolay Martynov 66570a2135 Add some synchronization into ES tests to make them more stable 2018-12-04 12:15:44 -05:00
Tyler Benson 3be4bbb7f0
Merge pull request #608 from DataDog/tyler/upgrades
Update misc versions.
2018-12-03 15:07:36 -08:00
Tyler Benson 74743be6e5 Remove duplicate JMS spans from nested calls. 2018-12-03 11:15:28 -08:00
Andrew Kent 20b726bca7
Merge pull request #609 from DataDog/ark/aws-muzzle-ranges
Simplify AWS muzzle ranges
2018-11-30 18:53:05 +00:00
Tyler Benson 983077d150 Move mock/assert deps out of common dependencies 2018-11-30 10:02:26 -08:00
Andrew Kent 91f1bef6f4 Simplify AWS muzzle ranges
AWS Muzzle workaround is no longer needed with latest muzzle
optimizations.
2018-11-29 16:18:14 -08: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 442323d4d1 Add catch so instrumentation errors don’t interrupt primary execution. 2018-11-29 13:14:12 -08:00
Tyler Benson c9ec9ebd0f Add guard against null values in extract adapter. 2018-11-29 13:06:01 -08:00
Tyler Benson ae063e8a14 Add additional 404 tests for spring boot.
This one succeeds in applying routing, but returns a 404 response.
2018-11-29 11:32:49 -08:00
Tyler Benson 785860b6a7 Add null check for envelope in consumer delegate 2018-11-29 11:22:32 -08:00
Tyler Benson 2f319b9301 Consumer delegate should rethrow the exception
Previously the delegate would swallow the exception and not rethrow.

I also added a test to attempt to verify, but the exception doesn’t seem to be observable in the test.

(See #602)
2018-11-28 08:36:15 -08:00
Nikolay Martynov e87d4ef161 Servlet3 instrumentation race consition fixes
* Do not set `asyncPropagate` on scope since it will be closed anyway.
* Close span once done with it in `TagSettingAsyncListener`.
* No point in explicit finishing span in 'finishOnClose' scope.
* Do not reattach listener in
  `TagSettingAsyncListener#onStartAsync`. Listener is attached each
  time by `Servlet3Advice#stopSpan` and reattaching listener in
  `TagSettingAsyncListener#onStartAsync` causes multiple listeners to
  be attached and race conditions to happen.
* Do not close span in `AsyncContextInstrumentation`. This leads to
  span being written prematurely. This span will be closed in
  `TagSettingAsyncListener` anyway, along with adding proper status code.
2018-11-27 17:17:56 -08:00
Tyler Benson e46ab1d01d
Merge pull request #600 from DataDog/tyler/threadpool-errors
Improve error handling for ThreadPoolExecutorInstrumentation
2018-11-27 15:24:58 -08:00
Tyler Benson 4199f924ac Remove ES-transport instrumentation from rest test
It is generating an extra trace/span that in a realistic scenario would be generated by the server, not the client.
2018-11-27 13:02:44 -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
Nikolay Martynov 6f61ddc67d
Merge pull request #594 from DataDog/mar-kolya/es-tests-stability
Improve stability of ES tests by avoiding unpredictable spans
2018-11-26 22:50:43 -08:00
Gary 90777f4b39
Retire/remove version scan
Remove version scan dead code and unnecessary classLoaderMatcher methods in instrumentations. Depends on #572
2018-11-26 18:21:56 -05:00
Gary 477c2f92c8
Address comments and add onClose callback on context to close scope. 2018-11-26 17:26:48 -05:00
Gary 50c2af9abb
remove classloader matcher 2018-11-26 16:57:12 -05:00
Gary 4169e42cdc
replace version scan with muzzle block 2018-11-26 16:55:33 -05:00
Gary 6475f20308
Refactor Ratpack
Remove the use of the OT project and Execution managed scopes. Updated tests.
2018-11-26 16:55:18 -05:00
Nikolay Martynov 467f14c359 Small fix in ES tests 2018-11-26 13:07:42 -08:00
Nikolay Martynov 23203fb659 Improve stability of ES tests by avoiding unpredictable spans 2018-11-23 09:43:41 -05:00
Nikolay Martynov 7dae6df890 In kafka latest deps test make sure that kafka version matches kafka client libs
This seems to help with compatibility
2018-11-22 21:02:05 -05:00
Nikolay Martynov fdffee8f5c Fix Hysrix test to not poll queue and return null
Instead wait for value to appear
2018-11-21 16:25:34 -05:00
Nikolay Martynov 2852a6a97a Fix setup so springweb tests produce appropriate logs 2018-11-21 16:03:19 -05:00
Nikolay Martynov 590ed30f56 Limit Jedis latest dep tests to 2+ versions of Jedis
Jedis 3 seems to have incompatible API changes
2018-11-21 11:43:13 -05:00
Nikolay Martynov a70da1d995 Remove redundant tests from SparkJava
Tests that create traces and do not assert on them may leave traces
behind for the next test causing errors.
2018-11-20 17:26:29 -05:00
Nikolay Martynov ca0a4a4458 Do not check ES document version in Sping test
ES may do things that change this version unexpectedly
2018-11-20 14:46:30 -05:00
Nikolay Martynov cd9ab3daef
Merge pull request #587 from DataDog/mar-kolya/set-netty-continuation-once
Set netty continuation only once
2018-11-20 13:19:45 -05:00
Nikolay Martynov 165f05beba Set netty continuation only once
Also remove continuation when getting it
2018-11-20 12:19:53 -05:00
Nikolay Martynov 228e7e0d21 Better handle Jetty async calls
Do same thing we do for servlets
2018-11-19 14:17:01 -05:00
Tyler Benson e4a12409c8 Add recursive servlet dispatch tests. 2018-11-16 14:40:35 -08:00
Tyler Benson e96752bbad Remove need for tomcat user file config 2018-11-16 09:56:42 -08:00
Tyler Benson 817895b559 Extract shared tests into abstract parent 2018-11-16 09:22:47 -08:00
Tyler Benson cde02e1ae5 Fix servlet async dispatch
Finish existing trace and propagate to the next request.

Improve dispatch testing.
2018-11-16 08:55:11 -08:00
Tyler Benson 3835157c4f
Merge pull request #577 from DataDog/tyler/spring-auth
Set user.principal in a way spring security can be covered
2018-11-16 08:52:42 -08:00
Tyler Benson 1064e35788 Apply standard tag name and update spring-web test deps version. 2018-11-16 08:06:40 -08:00
Tyler Benson 31b2e0f9b0
Merge pull request #578 from DataDog/tyler/components
Apply component tag more consistently
2018-11-15 13:02:39 -08:00
Nikolay Martynov 465e237522 Do not set component in AWS instrumentation that later get rewritten anyway 2018-11-15 13:21:49 -05:00