Commit Graph

1402 Commits

Author SHA1 Message Date
Will Gittoes 558cd9a3b7
Merge pull request #683 from DataDog/willgittoes-dd/hystrix-operation-name
Hard-code Hystrix operation (span) name, leaving the resource name dynamic
2019-02-01 09:44:29 +11:00
Will Gittoes 99e4e52600
Fix style 2019-02-01 09:29:05 +11:00
Tyler Benson e293ed477d Fix tests. 2019-01-31 14:25:19 -08:00
Tyler Benson f7abb2ac04 Initialize JMXFetch if configured log manager is on sys classpath
Some applications set java.util.logging.manager but never actually initialize the logger.
Check to see if the configured manager is on the system classpath.
If so, it should be safe to initialize jmxfetch which will setup the log manager.
2019-01-31 13:31:48 -08:00
Tyler Benson c89b00f682 Elaborate on comment. 2019-01-31 11:14:06 -08:00
Tyler Benson ea0dedcee7 Allow setting dd.app.customlogmanager=false to disable jboss check 2019-01-31 10:53:20 -08:00
Tyler Benson ee8a26d4dc Replace jboss classpath check with ENV check for jmxfetch delay
Some applications seem to have this jboss class on the classpath, but don’t actually use it.  When coupled with not actually using JUL, this means that we may never actually start JMXFetch.

Checking for JBOSS_HOME instead should be safer.
2019-01-31 10:42:43 -08: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 5941a93ad4
Merge pull request #679 from DataDog/willgittoes-dd/es-rest-6.4
Add support for Elasticsearch rest client 6.3 and above
2019-01-31 11:02:59 +11:00
Will Gittoes 57bae1688e
Review comments 2019-01-31 09:15:30 +11:00
Tyler Benson bb2fbb30b8 Add logging to JMXFetch initialization delay
Otherwise it’s difficult to determine why JMXFetch isn’t being initialized.
2019-01-30 10:39:29 -08: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
Tyler Benson 2971d1b0d3 Ensure the copyMetricConfigs task runs after processResources
Otherwise there seems to be a race condition which results in the metric config files being overwritten.
2019-01-28 13:43:07 -08: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
Tyler Benson 03bcdc97cc Move awaitGC to common utility package 2019-01-25 10:32:09 -08: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
Tyler Benson 58b67071e5
Merge pull request #673 from DataDog/tyler/fix-jmx-script
Makedir before creating file, Fail build if script errors
2019-01-25 09:51:13 -08:00
Nikolay Martynov 6563a711c2
Merge pull request #671 from DataDog/osgi-fix
Improve OSGi class loader instrumentation
2019-01-25 12:48:45 -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
Tyler Benson 020fe44ea6 Makedir before creating file, Fail build if script errors 2019-01-25 09:27:40 -08: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
Tyler Benson 146a16df25 Upgrade weak-lock-free to 0.15 2019-01-24 11:44:28 -08:00
Nikolay Martynov 6471a1a81e Add $ separate to state field name 2019-01-23 22:32:00 -05:00
Nikolay Martynov af15b17f1c Remove unnecessary helper from FutureInstrumentation 2019-01-23 22:31:59 -05:00
Nikolay Martynov e9745e6775 Log active span in test assert 2019-01-23 22:31:59 -05:00
Tyler Benson 63779c7816
Merge pull request #639 from DataDog/tyler/jmxfetch
Embedding existing jmx integrations with git submodule
2019-01-23 15:58:13 -08:00
Tyler Benson 1df20cf52c Upgrade to latest version of jmxfetch
This includes the ability to load config from resources.
2019-01-23 13:29:32 -08:00
Tyler Benson c93d146965 Update shadow plugin to 4.0.4 2019-01-22 11:13:18 -08: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
Andrew Kent af306f376b Comments explaining jmxfetch delay 2019-01-18 10:56:21 -08:00
Andrew Kent 097c557651 Delay jmxfetch init when custom log manager is used by client's app 2019-01-16 12:18:29 -08:00
Tyler Benson fe3ebceba9 Add jackson smile dep for old ES tests. 2019-01-16 13:27:04 -05:00
Andrew Kent 4c4b12e1d6 Expand custom logman tests to handle three different logman cases 2019-01-16 10:06:41 -08:00
Andrew Kent 6ffaa9e04f Remove jre logging integration 2019-01-16 08:59:10 -08:00
Andrew Kent 3295739e28 Fix race conditions in custom log manager test
Fix two race conditions in the custom log manager test.

- Remove possibility of false positives by blocking until jmx thread
  sends statsd metrics
- Disable logging in test to avoid deadlock in jmxfetch which can
  occur when the JVM shuts down too quickly
2019-01-16 08:57:59 -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
Andrew Kent cc8db0b11f Workaround module bug by skipping LogManager$Cleaner instrumentation 2019-01-09 15:03:43 -08:00
Tyler Benson f63d40fe55 Use git submodules to load metrics.yaml files 2019-01-08 10:13:18 -08:00
Tyler Benson 249951aa7a Add README 2019-01-08 09:36:08 -08:00
Tyler Benson de166e5ecb First pass at embedding existing jmx integrations
Using copy/paste from integrations-core.  Will depend on a new jmxfetch release with https://github.com/DataDog/jmxfetch/pull/205 before this will work.
2019-01-08 09:36:07 -08: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 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 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 571d9cf077
Merge pull request #632 from DataDog/ark/remove-errorprone
remove errorprone
2018-12-19 20:58:26 +00:00
Andrew Kent d0f3cfa3d6 Use asm bundled by bytebuddy in field-backed provider
JVM's ASM is not bundled with the agent and may not be present at runtime.
2018-12-19 12:37:47 -08:00
Gary Huang 513cccd698
Change shell script to work with play
- Added an argument to the script to take [play-zip|jar] to distinguish between the frameworks to test
- Updated README
- Cleanup
2018-12-14 11:19:17 -05:00
Gary Huang d3b7910950
Add work logic to play server 2018-12-14 11:19:15 -05:00
Gary Huang 34658aabcb
Play Server Performance Testing
Set up gradle sub project
2018-12-14 11:18:58 -05: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
Andrew Kent d60ecf0a62 Upgrade jmxfetch to latest version
Manually tested against wildfly. No startup bugs. New jvm metrics are
autoreported.
2018-12-10 10:58:35 -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 2d28b5129e
Merge pull request #621 from DataDog/mar-kolya/fix-wildfly-startup
Fix wildfly startup by injecting context classes into bootstrap package
2018-12-07 10:44:42 -05:00
Nikolay Martynov 3225c8fd03 Fix wildfly startup by injecting context classes into bootstrap package 2018-12-07 09:56:04 -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 600674b03a Put back muzzle check for 'dd-' threads 2018-12-05 17:20:50 -05:00
Nikolay Martynov 4deb68bfd7 Fix memory leak in WeakMapSuppliers.WeakConcurrent
The problem there is that it references JVM shutdown hook that keeps
reference to cleanup executor which potentially can keep references to
all sort of things - and this doesn't get cleaned up untill JVM
shutdown.

Solution is to remove shutdown hook when supplier is being GCed.
2018-12-05 15:02:40 -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 12a1b0ce08
Merge pull request #610 from DataDog/ark/jmxfetch-new-gc-metrics
Configure jmxfetch to use new gc metrics
2018-11-30 18:54:31 +00: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
Andrew Kent c9471e289b Configure jmxfetch to use new gc metrics
This won't have any effect on jmx behavior. The next jmxfetch update
puts our desired metric names behind this feature flag. Enabling now
so we don't forget the next time we refresh jmxfetch.
2018-11-30 10:13:11 -08: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 177c1432e3 Add tests to verify that fields are not injected when feature is disabled 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 1509286b15 Remove MapBackedProvider 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
Andrew Kent 3c4b480a18 Share tooling loader across muzzle runs 2018-11-28 13:01:01 -08:00
Andrew Kent 6ee5fd27b0 Guard against invoking WeakConcurrent constructor 2018-11-28 12:05:47 -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 51978d877f
remove version scan task from ci 2018-11-26 16:57:10 -05:00
Gary bf30d73746
remove skipping of ratpack helper checks 2018-11-26 16:55:36 -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
Andrew Kent 1b1527da93
Merge pull request #596 from DataDog/mar-kolya/set-gradle-heap
Mar kolya/set gradle heap
2018-11-26 19:39:40 +00:00
Nikolay Martynov 80cd7cd500 Do testAnnotationProcessor deps.autoservice in modules with services in tests
Otherwise sometimes tests cannod discover services
2018-11-23 09:44:49 -05: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
Tyler Benson 6126d6632e Add vertx latestDepTest 2018-11-15 09:58:21 -08:00
Nikolay Martynov 6f05cff023 Add test for UrlConnection error on file protocol 2018-11-15 12:31:42 -05:00
Tyler Benson cbb29069fe Apply component tag more consistently 2018-11-14 11:31:40 -08:00
Tyler Benson 0bb20abfce Set user.principal in a way spring security can be covered
Improve tests.
2018-11-14 11:30:05 -08:00
Tyler Benson 5381461da2 Apply limits for Elasticsearch
6.5 has api changes that break our tests.
2018-11-14 10:55:18 -08:00
Tyler Benson b58b54dab9 Limit Lettuce/Webflux versions and fix test for tomcat 9+ 2018-11-12 12:33:34 -08:00
Tyler Benson 51dfd2b184 Fix latestDepTests for Jetty 2018-11-12 11:05:02 -08:00
Tyler Benson 5e194ef06c Fix latestDepTests for Kafka Streams, Netty, and Okhttp 2018-11-12 08:15:24 -08:00
Gary a2a194d48a Fix latestDepTest for JSP instrumentation.
Normalize jsp.requestUrl tag value because Tomcat 9 seems to add relative path symbols of jsp files.

Tomcat 9 doesn't automatically create a connector, causing failures in latestDepTest. Tomcat 9 also seems to have small changes that effect some of the tests, such as changing the exception type and also removal of the exception message in one of the tests.
2018-11-12 08:15:24 -08:00
Tyler Benson 9bd2b86d2e Add assertion to ensure latestDepTest dependencies are different from test. 2018-11-12 08:15:24 -08:00
Gary 9d7d40565a
Limit AMQP LatestDepTest to use last working version
Makes AMQP LatestDepTest not use the latest version because it uses a snapshot version of spring, causing error when downloading.
2018-11-09 11:09:04 -05:00
Nikolay Martynov 98efa8aaa3
Merge pull request #566 from DataDog/mar-kolya/specify-scala-dependency
Mar kolya/specify scala dependency
2018-11-05 21:05:54 -05:00
Nikolay Martynov 9c652cc5b2 Remove duplicate class names from ExecutorInstrumentation 2018-11-05 12:55:32 -05:00
Nikolay Martynov b8276ac70b Specify Scala dependency in single place 2018-11-05 12:55:32 -05:00
Andrew Kent 1667e590b9 Log Java and JVM version info. 2018-11-02 17:12:00 -07:00
Nikolay Martynov 3c0ba56d2c Make context maps 'global' for a given key class name
This ensures that different instrumenters using same key class can see
each others state
2018-11-02 12:59:30 -04:00
Nikolay Martynov 98df97af3e First iteration on a better context store api
Separate context storage from actual fetching/putting
2018-11-02 10:46:57 -04:00
Andrew Kent 387068caf8
Merge pull request #558 from DataDog/ark/helper-injector-classloader
Inject dynamic classes into bootstrap class loader
2018-11-01 22:19:49 +00:00
Andrew Kent d0b00e0dc0 Inject all map holder classes into the bootstrap 2018-11-01 15:05:20 -07:00
Nikolay Martynov 13a8add2e7
Merge pull request #559 from DataDog/mar-kolya/add-lost-jdbc-statement-logging
Catch `AbstractMethodError` when trying to unwrap jdbc connection
2018-11-01 11:50:44 -04:00
Nikolay Martynov 15024915bf Catch `AbstractMethodError` when trying to unwrap jdbc connection
jdts throws this exception since they just have 'stub' umplementation.
2018-11-01 09:57:18 -04:00
Andrew Kent 5f0f6f1474 Inject dynamic classes into topmost class loader 2018-10-31 16:11:52 -07:00
Nikolay Martynov e83c379992
Merge pull request #557 from DataDog/mar-kolya/add-lost-jdbc-statement-logging
Add logging in jdbc instrumentation when we cannot unwrap connection
2018-10-31 15:55:03 -04:00
Nikolay Martynov 8a066de772 Add logging in jdbc instrumentation when we cannot unwrap connection 2018-10-31 13:38:37 -04:00
Andrew Kent 6198662984
Merge pull request #555 from marcoferrer/grpc-tracing-kotlin-exception-support
Catch and log throwables to support kotlin exception handling
2018-10-31 03:44:15 +00:00
Marco Ferrer 1bd97a0f90 catch and log throwables to support kotlin exception handling 2018-10-30 23:00:29 -04:00
Andrew Kent 5824eb83b8
Merge pull request #537 from DataDog/ark/instrumentation-context-outline
instrumentation context map-backed impl
2018-10-29 18:48:23 +00:00
Nikolay Martynov ff9e5ba99f Increase couchbase timeout
It looks like Couchbase is often really slow to start.
2018-10-26 17:08:36 -04:00
Andrew Kent b89aa54a93 Move ASM visiting method into context-store impl 2018-10-26 14:06:57 -07:00
Andrew Kent cc27f1507e Javadoc for map-backed context store. Type info on context store api 2018-10-26 13:41:24 -07:00
Andrew Kent 0fa35a0654
Merge pull request #548 from DataDog/tyler/remove-releases
Remove historical releases
2018-10-26 19:17:36 +00: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
Nikolay Martynov faad1d92b0 Clarify output of Hystrix test 2018-10-24 15:13:21 -04:00
Tyler Benson ad48630171 Remove historical releases
Previously kept for comparing benchmarks across versions, but they can be downloaded as needed.  Don’t need to be kept in the history.
2018-10-24 10:18:30 +10:00
Tyler Benson 8464353bc3
Merge pull request #545 from DataDog/mar-kolya/update-jmx-fetch
Update jmxfetch to latest version
2018-10-24 08:40:59 +10:00
Nikolay Martynov 14e85941c0
Merge pull request #547 from DataDog/mar-kolya/weak-concurrent-map-thread-cleanup
Mar kolya/weak concurrent map thread cleanup
2018-10-23 18:12:24 -04:00
Nikolay Martynov fc13d7db2b Reorganize WeakConcurrent implementation to allow cleanup thread GC when map is out of scope 2018-10-23 16:30:51 -04:00
Nikolay Martynov 14ad40f598 Update jmxfetch to latest version
No functional changes but this is the first version published on Maven Central
2018-10-23 09:56:54 -04:00
Tyler Benson 041b9c30d4 Fix failing test from master. 2018-10-23 17:35:00 +10:00
Nikolay Martynov 4e6f179a7a
Merge pull request #543 from DataDog/mar-kolya/jmxfetch-additional-tags
Add config for tags that propagate to JMXFetch and spans
2018-10-22 20:56:56 -04:00
Nikolay Martynov 34372533c1 Add config for tags that propagate to JMXFetch and spans
Also add runtime-id tag to root span and JMXFetch metrics
2018-10-22 15:51:20 -04:00
Tyler Benson 13c91d11e5 Upgrade shadow to 4.0.1 and exclude module-info.class files. 2018-10-22 10:44:04 +10:00
Tyler Benson 192b0fd478 misc minor changes 2018-10-22 10:44:04 +10:00
Andrew Kent 7547e0fc5e Cleanup and javadoc 2018-10-19 13:07:11 -07:00
Gary Huang 9b3019c612
Merge pull request #487 from DataDog/gary/muzzle-aws-sdk
Muzzle AWS SDK Instrumentation
2018-10-19 15:31:25 -04:00
Tyler Benson 78c6f881ed
Merge pull request #535 from DataDog/tyler/rabbit
Add instrumentation for RabbitMQ’s AMQP library
2018-10-19 23:26:50 +10:00
Tyler Benson b693335ef5 Add routing key to resource name for publish command. 2018-10-19 13:19:50 +10:00
Tyler Benson 97dd303909 Don’t change resource name of span unless it’s for Rabbit. 2018-10-19 12:27:34 +10:00
Tyler Benson 64595cf485 Add type hints and parent assertion 2018-10-19 11:51:57 +10:00
Tyler Benson 7ece2fe2a6 Prevent exchange name being overwritten in publish resource name. 2018-10-19 10:25:32 +10:00
Tyler Benson 80f160be72
Merge pull request #539 from DataDog/mar-kolya/increase-netty-timeout
Increase request timeout in netty client tests
2018-10-19 09:34:14 +10:00
Tyler Benson 6ad309cec0
Merge pull request #538 from DataDog/tyler/increase-retry
Add additional retries for ES tests.
2018-10-19 09:33:55 +10:00
Nikolay Martynov a5d8c3fc7d Increase request timeout in netty client tests
Otherwise requests timeout and tests fail
2018-10-18 16:19:24 -04:00
Nikolay Martynov 7b88abfd9d Use maven central to fetch jmxfetch lib 2018-10-18 16:06:08 -04:00
Andrew Kent 131074c255 Move InstrumentationContext api to bootstrap 2018-10-18 10:16:15 -07:00
Nikolay Martynov e02f889f09 Remove some dead code from SpockRunner
And also reformat it
2018-10-18 10:06:41 -04:00
Nikolay Martynov 3cc520ecb9 Add integration test for jmxfetch 2018-10-18 09:46:47 -04:00
Nikolay Martynov 60f799dd5a Configure jmxfetch host and port separately 2018-10-18 09:46:47 -04:00
Nikolay Martynov 97fe8cbf88 Add option to disable JMXFetch 2018-10-18 09:46:47 -04:00
Nikolay Martynov 403040bac0 Use JMXFetch as a library 2018-10-18 09:46:44 -04:00
Gary 21fa1430c8
add comment about choice of version 2018-10-18 09:28:43 -04:00
Gary 796ce20ca6
split muzzle ranges into blocks to avoid OOM in ci 2018-10-18 09:28:41 -04:00
Gary fadf676b6e
Combining AWS instrumentations. Test for both 1.11.0 and 1.11.106 since builder was not available in 1.11.0. 2018-10-18 09:28:39 -04:00
Gary Huang 254f721baf
Muzzle AWS SDK Instrumentation
Add muzzle blocks and remove class loader matcher methods.
2018-10-18 09:28:37 -04:00
Tyler Benson 8ff5c7c36c Review fix comments and version range. 2018-10-18 16:08:37 +10:00
Tyler Benson be205010c1 Add additional retries for ES tests. 2018-10-18 11:00:52 +10:00
Andrew Kent b02ed4e813 Initial Map-backed implementation and test 2018-10-17 15:29:59 -07:00
Nikolay Martynov e74d054291 Add tests for Vertx HTTP client 2018-10-17 14:47:31 -04:00
Nikolay Martynov 739f2d0daa Add tests for vertx HTTP server 2018-10-17 14:47:28 -04:00
Tyler Benson 8ffeb5bedf Add instrumentation for RabbitMQ’s AMQP library 2018-10-17 16:32:24 +10:00
Andrew Kent f098b8027e Basic implementation outline and happy-path test 2018-10-16 10:22:36 -07:00
Nikolay Martynov fc11f199b7 Improve netty4.1 server tests 2018-10-15 16:50:02 -04:00
Nikolay Martynov a4a1c70393 Enable all 8+ JVMs for netty-4.1 tests 2018-10-15 15:26:36 -04:00
Andrew Kent 7330ceaf4e Instrumentation Context outline for HttpURLConnection as an example 2018-10-15 11:05:23 -07:00
Tyler Benson 6b0e43b32d
Merge pull request #529 from DataDog/tyler/dropwizard
Integration for Dropwizard Views
2018-10-15 14:58:37 +10: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
Andrew Kent a697881efb Assert no bootstrap classes in test fields or method signatures 2018-10-11 19:52:00 -07:00
Tyler Benson 14846a79df Add Dropwizard-views instrumentation 2018-10-11 14:39:04 +10:00
Tyler Benson ebf0d86734 Add Muzzle testing for dropwizard-client 2018-10-11 14:21:39 +10:00
Andrew Kent 13c96bba33 Additional test for shared field 2018-10-10 10:40:04 -07:00
Andrew Kent 7dea113777 Skip jacoco for TestUtils 2018-10-10 10:33:49 -07:00
Andrew Kent 36d396cb8e Fix AgentTestRunner bootstrapping 2018-10-10 10:33:49 -07:00
Gary Huang 3c0d6494ca
Merge pull request #483 from DataDog/gary/muzzle-servlet-2
Muzzle servlet-2 Instrumentation
2018-10-05 12:30:07 -04:00
Qiyang Huang a0170dbc69
Add fail block for servlet 2 2018-10-05 12:06:47 -04:00
Gary Huang c7eb667c0e
Muzzle servlet-3 Instrumentation
Add muzzle block and remove class loader matcher method.
2018-10-05 12:06:45 -04:00
Gary Huang eb5f33094b
Merge pull request #519 from DataDog/gary/enable-spymemcached
Enable Spymemcached instrumentation by default
2018-10-05 12:03:43 -04:00
Nikolay Martynov f71192266c Rework the way multi-jvm tests work
To allow some JVMs runs only subset of tests
2018-10-02 13:20:19 -04:00
Tyler Benson 330e09d0b3
Merge pull request #477 from DataDog/tyler/bb-upgrade
Upgrade Byte Buddy to 1.9.0
2018-10-02 11:31:11 -04:00
Nikolay Martynov 1299141ff6 Enable akka instrumentation by default 2018-10-02 10:20:25 -04:00
Tyler Benson 929bc3b690
Merge pull request #521 from DataDog/tyler/apache-http
Refactor Apache HttpClient Instrumentation.
2018-10-01 14:59:35 -04:00
Tyler Benson 6fdcfc783a Keep operation name the same 2018-10-01 14:28:14 -04:00
Nikolay Martynov 55c2935a19 Remove some hacks that were made for Gradle 4.10.1 2018-10-01 13:40:17 -04:00
Tyler Benson 6b8eb60ca2 Upgrade Byte Buddy to 1.9.0 2018-10-01 13:31:03 -04:00
Tyler Benson 8b822ff26d Fix AWS tests and change span type to http-client
There seems to be a bug.  I would expect the aws span to be the parent of the apache http span, but that is not the case.

Removed the now unused HTTPComponent decorator.
2018-09-28 21:23:30 -04:00
Gary 2312c13aa2
restore classLoaderMatcher to make instrumentation safer 2018-09-28 20:45:22 -04:00
Gary Huang 80b4a9790c
Fix versions range 2018-09-28 20:45:20 -04:00
Gary Huang c7e8755492
Muzzle servlet-2 Instrumentation
Add muzzle block and remove class loader matcher method.
2018-09-28 20:45:18 -04:00
Tyler Benson 4eb0cd4097 Refactor Apache HttpClient Instrumentation.
Removes the need for DDTracingClientExec.
Reduces extra spans.
Does not include a span for each redirect.
Compatible with 4.0+ instead of just 4.3+.
2018-09-28 17:52:39 -04:00
Andrew Kent 5864dd90e7 Allow instrumenting com.sun.messaging. namespace 2018-09-28 14:37:32 -07:00
Gary 79d3327475
Enable Spymemcached instrumentation by default 2018-09-28 14:51:10 -04:00
Gary Huang cbaf61af04
Merge pull request #492 from DataDog/gary/muzzle-sparkjava
Muzzle and Expand Spark Java Instrumentation
2018-09-27 22:47:15 -04:00
Gary Huang 7ecc49a228
Merge pull request #509 from DataDog/gary/muzzle-spy-memcached
Muzzle Spymemcached
2018-09-27 22:44:56 -04:00
Andrew Kent 707685ed66
Merge pull request #516 from DataDog/mar-kolya/use-okhttputils
Use OkHttpUtils in more places
2018-09-26 19:32:49 -07:00
Gary 33ab8d0072
Expand instrumentation version range and rename package 2018-09-26 22:31:23 -04:00
Qiyang Huang fe6ee07aad
Add assert inverse 2018-09-26 22:31:21 -04:00
Gary Huang e937e4322b
Muzzle Spark Java Instrumentation
Add muzzle block.
2018-09-26 22:31:14 -04:00
Nikolay Martynov 419b859324 Remove classloaders instrumentation
This is dead code that is not used
2018-09-26 17:33:30 -04:00
Nikolay Martynov 5d627733d8 Use OkHttpUtils in more places 2018-09-26 15:07:20 -04:00
Gary 827b721ae4
add comment about build vs muzzle versions 2018-09-26 14:26:58 -04:00
Nikolay Martynov 84bef23698 Increase timeouts in Couchbase to make tests more stable 2018-09-26 13:47:37 -04:00
Nikolay Martynov d48eb4de77 Decouple Groovy version from Gradle
And use newer Groovy and Spock
2018-09-26 13:47:34 -04:00
Nikolay Martynov dfba97273c lock version of spring-data-es to avoid upgrading ES to 6.x.x in 5.3 instrumentation 2018-09-24 14:59:25 -04:00
Tyler Benson 76876e7d9e
Merge pull request #443 from DataDog/tyler/executor-instrumentation
Allow executor tracing to flow across distinct executors
2018-09-23 10:12:56 +10:00
Andrew Kent bf24e5d5d0
Merge pull request #511 from DataDog/tyler/es-extract-index
Cleanup created indexes to allow RetryOnFailure
2018-09-21 11:21:33 -07:00
Tyler Benson a14945f6e0 Cleanup created indexes to allow RetryOnFailure 2018-09-21 14:44:14 +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 c84c83f168
Merge pull request #501 from DataDog/tyler/gradle-upgrade
Upgrade gradle to 4.10.1
2018-09-20 10:51:50 +10:00
Tyler Benson 21f4806d08
Merge pull request #506 from DataDog/tyler/es-tlc
Remove elasticsearch.request.description
2018-09-20 10:45:36 +10:00
Gary Huang 89d83663c7
Merge pull request #493 from DataDog/gary/muzzle-datastax-cassandra
Muzzle and Expand Cassandra Instrumentation
2018-09-19 16:38:06 -04:00
Gary Huang 622db5942b
Merge pull request #486 from DataDog/gary/muzzle-jetty
Muzzle Jetty Instrumentation
2018-09-19 16:07:19 -04:00
Gary Huang 4db131b415
Merge pull request #488 from DataDog/gary/muzzle-jms
Remove version scan from JMS Instrumentation
2018-09-19 16:06:41 -04:00
Gary Huang ba8efa5bc6
Merge pull request #498 from DataDog/gary/muzzle-mongo
Muzzle Mongo Instrumentations
2018-09-19 15:31:34 -04:00
Qiyang Huang 347002c0f6 Muzzle Spymemcached
Add muzzle block and remove class loader matcher method.
2018-09-19 14:37:25 -04:00
Tyler Benson ebcc2ef052 Add work around for scala compile issue. 2018-09-19 15:13:42 +10:00
Tyler Benson 9dad0fb4d6 Separate out latestDepTests 2018-09-19 15:10:26 +10:00
Tyler Benson 72f2036dc7 Remove retry from some tests
Index creation fails the next time around.
2018-09-19 14:57:37 +10:00
Tyler Benson ea97996df7 Remove elasticsearch.request.description
It seems to potentially have sensitive contents, so removing to be safe.
2018-09-19 14:55:23 +10:00
Tyler Benson 2b93aa7cbf Fix ES version ranges. 2018-09-19 14:51:38 +10:00
Tyler Benson f9f0438e85 Initialize WeakMapProvider even earlier
It is used by classes delcared as static fields in AgentInstaller, so there were some cases where the fallback is being used.
2018-09-19 08:37:08 +10:00
Tyler Benson 70e4525131
Merge pull request #502 from DataDog/tyler/jdbc-errors
Better error handling for older JDBC drivers
2018-09-19 08:33:48 +10:00
Tyler Benson 296f9adfc2 Ignore byte buddy classes
not having this produced the following error on startup:

```
Cannot resolve type description for net.bytebuddy.dynamic.Nexus
```
2018-09-18 17:20:36 +10:00
Tyler Benson e11ab12284 Better error handling for older JDBC drivers
that don’t support unwrapping (pre JDK 1.6).
2018-09-18 16:46:08 +10:00
Tyler Benson 955b97da9e Add slashes if missing from annotation values 2018-09-18 09:48:32 +10:00
Qiyang Huang 91f0b1d662 Change compile & test versions to match muzzle blocks 2018-09-16 08:34:22 -04:00
Qiyang Huang e3712910b1 Muzzle Mongo Instrumentations
Add muzzle blocks.
2018-09-16 08:30:05 -04:00
Tyler Benson c1ab82663d
Merge pull request #479 from DataDog/tyler/broken-jax-rs-client
Handle connection failures for Jersey and Resteasy
2018-09-13 15:19:01 +10:00