Commit Graph

71 Commits

Author SHA1 Message Date
Tyler Benson fd43210e07 Add task timeout for tests. 2019-05-23 17:13:40 -07:00
Tyler Benson c500d4b236 Migrate OkHttp Instrumentation to Decorators 2019-03-08 15:12:29 -08:00
Tyler Benson 000c0e4644 Upgrade Gradle to 4.10.3
Also try to improve build time performance by reducing the required configuration:
https://blog.gradle.org/preview-avoiding-task-configuration-time
2019-02-07 09:43:36 -08:00
Tyler Benson 03bcdc97cc Move awaitGC to common utility package 2019-01-25 10:32:09 -08:00
Tyler Benson c93d146965 Update shadow plugin to 4.0.4 2019-01-22 11:13:18 -08:00
Tyler Benson 6a09f6e2b9 Moves all ittests to be tests under dd-java-agent.
This was weird having it as a separate project.  Reduces the number of top level directories.

There weren’t any existing tests in dd-java-agent’s test directory, so this seemed like a good place to put them.
2019-01-04 15:25:36 -08:00
Tyler Benson 13c91d11e5 Upgrade shadow to 4.0.1 and exclude module-info.class files. 2018-10-22 10:44:04 +10:00
Nikolay Martynov 403040bac0 Use JMXFetch as a library 2018-10-18 09:46:44 -04:00
Tyler Benson b5c8a8b8fc Apply formatter on gradle files. 2018-07-31 12:04:00 +10:00
Andrew Kent 3894f829bb Remove most shadow relocates
Shadow relocates are no longer needed because of our new bootstrapping
process.
It's no longer possible for agent dependencies to interfere with the
user's classpath.

The immediate reason for this change is a bug created in the Cassandra
instrumentation.
The Cassandra instrumentation references guava transitive deps from
the datastax driver. These references are re-written by shadow,
causing the instrumentation to reference 'datadog.agent.deps.google.*'
instead of the guava class.
2018-06-27 09:35:54 -07:00
Tyler Benson ff56389a56 Upgrade some versions. 2018-06-14 11:56:56 +10:00
Tyler Benson 441bf59e80 Add tracing for other annotations and config
Allows for specifying additional traced methods via env var or sys prop config.
2018-05-07 13:27:23 +10:00
Tyler Benson 9a52303376 Apply jacoco to every java project
Some projects have ignores/whitelists, but generally coverage is pretty high.

AFAIK, this doesn’t really capture instrumentation test coverage though.
2018-05-04 16:23:32 +10:00
Andrew Kent a34d8f7876
Merge pull request #293 from DataDog/tyler/upgrade
Upgrade Byte-buddy to 1.8.8
2018-04-30 15:42:21 -07:00
Tyler Benson 8abbccc09c Upgrade shadow plugin version. 2018-04-30 16:18:48 +10:00
Tyler Benson e6179f6555 Use hardcoded operation names for integrations
Backend has issues with variable operation names.

Also reduce dependencies on OT-contribs.
2018-04-27 12:37:19 +10:00
Tyler Benson 6c756afe7a Misc upgrades. 2018-03-27 11:26:46 +08:00
Andrew Kent 84fe1fc0e3 Organize bootstrap and agent classes by known prefix. 2018-03-15 12:17:03 -07:00
Tyler Benson 58c0dfa9cd Remove API jar relocation
We expect customers to be using these also, so we can’t change them.
2018-03-12 12:08:27 +10:00
Andrew Kent 4a1db505db Enhance logging and cleanup. 2018-02-15 19:17:19 -08:00
Andrew Kent cfef64b026 Reorganize dd-java-agent subprojects 2018-02-15 18:55:02 -08:00
Tyler Benson 7d28a32fba Allow instrumentation to be disabled
By default, instrumentation is enabled, and can be disabled by default by overriding the `defaultEnabled` method. Instrumentation can also be disabled individually or enabled when default is disabled.
2018-02-06 11:20:05 +10:00
Andrew Kent bff9ae2f4e Disable Kafka Instrumentation 2018-02-05 10:42:48 -08:00
Andrew Kent d703095717 Patch getLogger calls to safe logger. 2018-02-04 12:09:11 -08:00
Tyler Benson 64d39030e5 Use workflows in Circle to test Java 7 and 8
Java 9 is commented out because there are some test failures that will be investigated later.

Some tests had to be excluded from Java 7 because they don’t have a Java 7 compatible version.
2018-01-22 13:46:50 -05:00
Tyler Benson 6d3d88987b Rename dd-trace-annotations to dd-trace-api
And move DDTags over to it.
Move some `datadog.trace.api` classes over to `datadog.trace.common`.
Other misc renaming.
2018-01-09 10:07:36 +10:00
Tyler Benson becf2a5862 Lots of renaming
Module:
dd-trace -> dd-trace-ot

Packages:
Standardize on `datadog.trace` and `datadog.opentracing` as the package prefixes.
2018-01-09 10:02:06 +10:00
Andrew Kent 887a864118 Automatically pull integrations into the agent 2017-12-18 16:44:12 -08:00
Andrew Kent f68406113a Remove helpers from agent 2017-12-18 16:44:12 -08:00
Andrew Kent 0abf3f342d Use HelperInjector to include instrumentation helper classes.
Move instrumentation helpers out of helpers subproject and into the
appropriate instrumentation module.
2017-12-18 16:44:12 -08:00
Tyler Benson 6f985c15bf Remove Byteman now that instrumentation is migrated
At some point, we should refactor the managers since this leaves them in an awkward state.
2017-12-07 13:11:26 -08:00
Tyler Benson d933a4049a Move OkHttp instrumentation to byte buddy 2017-12-06 18:07:17 -08:00
Andrew Kent 6fa303058f ApacheHttpClient bytebuddy instrumentation and tests. 2017-12-01 10:54:32 -08:00
Andrew Kent 7298b0a31a Convert datastax cassandra instrumentation to bytebuddy 2017-11-28 17:01:04 -08:00
Andrew Kent 47b1eec6da Mongo Async Instrumentation and embedded mongo tests. 2017-11-27 09:18:49 -08:00
Andrew Kent 86a76ec588 Convert Mongo instrumentation to ByteBuddy 2017-11-27 09:18:49 -08:00
Tyler Benson 871ce37f80 Migrate JMS to Byte Buddy and add JMS 1 support
This does not yet include instrumentation for MessageListener.
I think there is actually no difference between the instrumentation so we should combine them.
I also added TEXT_MAP as a format that maps to the HTTP Codec.  There is some remapping inside the instrumentation to remove dashes before setting as a property.  This should also be changed when an official format is defined.

This also currently has a problem with Spring Boot applications as the JMS Util references classes not on the system classpath (it needs to be injected into the child classpath)
2017-11-17 12:06:30 -08:00
Tyler Benson ff4f39779e Fix transitive dependencies
New instrumentation was bringing in their dependencies into the jar, resulting in a much larger jar file.  This should resolve that.
2017-11-10 11:45:00 -05:00
Tyler Benson e96c084b51 Migrate aws instrumentation to byte buddy. 2017-11-06 14:25:28 -08:00
Tyler Benson e5924b3fe9 Migrate servlet instrumentation to byte buddy. 2017-11-06 11:28:06 -08:00
Tyler Benson e8bbc849bb Set resource name using the route pattern from spring.
This provides a better static resorce name than trying to conjure one out of the original URL.
2017-10-30 13:24:18 -07:00
Tyler Benson cacba43435 Use byte buddy for @Trace instead of byteman. 2017-10-26 14:45:16 -07:00
Tyler Benson b40bcf9973 Add automatic instrumentation for JDBC
This instrumentation creates spans for Statements and PreparedStatements. It also captures the corresponding SQL and additional connection info.  ResultSet could be considered for future instrumentation to capture even more of the DB interaction time.

This integration uses Bytebuddy instead of Byteman as the many methods to instrument would have been messy in Byteman.
2017-10-24 10:28:53 -07:00
Tyler Benson 423b701049 Downgrade byteman library to non-beta version.
This is in effort to reduce some performance problems.
2017-10-24 08:15:37 -07:00
Tyler Benson 4e106679a7 Move packages around and rename dd-trace inside agent
This avoids conflicts if the user already has dd-trace included in their app.
2017-09-11 15:00:00 -07:00
Tyler Benson 3bc153241b Abstract core dependencies for central management 2017-09-07 16:38:21 -07:00
Tyler Benson 62c167de16 Inject helper classes into application’s classloader
This is important for things like Spring Boot’s executable jar classloader which keeps all the jars individually rather than on the system classloader.
2017-09-06 11:08:28 -07:00
Tyler Benson c652aa262c Remove dependency on OpenTracing Agent
It brings in a bunch of duplicate and unnecessary dependencies since it also bundles them in its’ jar.  Copying the OpenTracingHelper class to our repo until we can refactor it away.  It also is Apache 2 licensed so I think we should be ok.
2017-09-05 16:48:22 -07:00
Tyler Benson 3df63d9e53 Split up manager responsibility by job
`TraceAnnotationsManager` is responsible for generating the rules for `@Trace`ed methods, `InstrumentationRulesManager` is responsible for our custom built Integrations.
2017-09-05 13:52:11 -07:00
Tyler Benson a8908c06d8 Move helpers to a separate project for future bundling
This will allow us to eventually inject these classes in the correct classpath rather than having them on the system classpath.
2017-09-05 12:19:22 -07:00