Commit Graph

61 Commits

Author SHA1 Message Date
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
Tyler Benson 8ba3c0f156 Fix jacoco for integration tests
Also change slf4j package since it’s important for configuring log levels.
2017-09-05 11:43:37 -07:00
Tyler Benson ec08b37757 Use package-renamed Simple SLF4J logger
This will prevent us from respecting any existing SLF4J implementation and just print to the console.  This is important for things like Spring Boot that never put a SLF4J implementation on the system classpath, but instead keep it inside the jar.
2017-08-28 14:57:46 -07:00
Tyler Benson a0d4f2ca76 Report version from main
This allows running the agent as an executable jar to report the version number.

Also repot version scan errors better.
2017-08-28 13:39:19 -07:00
Tyler Benson ab7598804e Update dropwizard and spring boot readmes. 2017-08-23 15:35:55 -07:00
Tyler Benson 9ff937557e Ensure rules are loaded on the right classpath for Spring Boot 2017-08-23 14:30:18 -07:00
Tyler Benson db2758af19 Merge branch 'master' into tyler/versions
# Conflicts:
#	dd-java-agent/src/main/java/com/datadoghq/trace/agent/InstrumentationChecker.java
2017-08-23 09:08:40 -07:00
Tyler Benson 34f0922740 Add property to gradle.properties for easier debugging
When using a jar with packages renamed, the line numbers don’t match the classes in the IDE.
2017-08-22 17:23:28 -07:00
Tyler Benson aad3746c2b Fix tests 2017-08-18 11:12:06 -06:00
Guillaume Polaert 2f65e93167 Remove OTARULES from OT agent 2017-08-16 11:16:12 +02:00
Tyler Benson 5dff2f1249 Rename google and byteman dependencies
But exclude the ones that cause the tests to fail.
Also add a test to verify the correct version of guava is loaded with the agent running.
2017-08-08 12:29:14 -07:00