Commit Graph

474 Commits

Author SHA1 Message Date
Lev Priima a5a5743f7c
WeakCache instead of WeakMap (#1256)
WeakCache abstraction in addition to WeakMap
2020-03-20 00:23:07 -07:00
Tyler Benson a7b327e72e Add check to ensure value isn't empty
Otherwise split on an empty string will return an empty array.
2020-03-13 14:56:45 -07:00
Brian Devins-Suresh a3fbcd6192 They need to fix the suggestions workflow... 2020-03-12 14:47:47 -04:00
Brian Devins-Suresh 9fe9be3f7c
Apply suggestions from code review
Co-Authored-By: Laplie Anderson <randomanderson@users.noreply.github.com>
2020-03-12 14:43:13 -04:00
Brian Devins-Suresh 98f58dbea9 Rework test logic for ignores. Add spring proxy to global ignore list 2020-03-12 14:33:02 -04:00
Laplie Anderson 6cd530a541 Move decorators to bootstrap 2020-03-11 18:41:29 -04:00
Laplie Anderson 0d6328a76e Add toString() for bootstrap placeholder 2020-03-11 18:37:03 -04:00
Tyler Benson 36c063c4b3
Merge pull request #1303 from trask/fix-for-spring-jms-listeners
Fix for Spring JMS listeners
2020-03-10 09:54:54 -07:00
Laplie Anderson 645c4de2c9 Fix ignores for com.google.inject 2020-03-09 17:41:15 -04:00
Trask Stalnaker 7761094280 Fix for Spring JMS listeners 2020-03-08 22:41:58 -07:00
Trask Stalnaker 5834b2cab1 Add comment explaining why keeping delegate check 2020-03-06 13:37:01 -08:00
Trask Stalnaker 0ca384d24c Revert "Remove non-delegating class loader check"
This reverts commit c63c981221.
2020-03-06 13:21:02 -08:00
Trask Stalnaker 7ede895b53 Revert "Cache is not needed anymore"
This reverts commit 166d951a10.
2020-03-06 13:18:08 -08:00
Douglas Q Hawkins 3ff5b99cd6
Merge pull request #1285 from DataDog/dougqh/jar-file-collisions
Avoid temporary Jar file collisions
2020-03-06 15:14:25 -05:00
Nikolay Martynov 46b776f76a Include classloading instrumentation into all tests
Classloading instrument core JDK classes so we should make sure this
doesn't have bad effects on other instrumentations.
2020-03-06 13:50:56 -05:00
Nikolay Martynov 51630ada62 Unignore `org.h2.util.Task` 2020-03-06 13:49:55 -05:00
Nikolay Martynov 18f9c653b9 Exceptions for hppc 2020-03-06 13:49:55 -05:00
Nikolay Martynov a261fb4760 More spring exceptions 2020-03-06 13:49:55 -05:00
Nikolay Martynov 930c1fb4e9 One more exception for h2 2020-03-06 13:49:55 -05:00
Nikolay Martynov fd4257627d Do not ignore org.springframework.util.concurrent. 2020-03-06 13:49:55 -05:00
Nikolay Martynov 74161a5872 Add missng dots 2020-03-06 13:49:55 -05:00
Nikolay Martynov ab8b246553 Remove asm matchers - asm is already matched elsewhere 2020-03-06 13:49:55 -05:00
Nikolay Martynov a8c625b8f0 Fix google http client ignore matchers 2020-03-06 13:49:55 -05:00
Nikolay Martynov e301761dc2 Stop ignoring org.springframework.scheduling.annotation
It has some runnables and it is not very big
2020-03-06 13:49:55 -05:00
Nikolay Martynov 0d34aa2e96 Stop skipping cassandra core instrumentation
Looks like it has lots of runnables sprinkled all over the place
2020-03-06 13:49:55 -05:00
Nikolay Martynov c1c9ffa571 Fix couchbase ignores 2020-03-06 13:49:55 -05:00
Tyler Benson ca043a67b5
Merge pull request #1298 from DataDog/tyler/classloader-matcher
ClassLoader matcher cleanup
2020-03-05 20:00:09 -08:00
Tyler Benson d25ace6627
Merge pull request #1292 from DataDog/tyler/add-test-retrys
Attempt to improve test reliability
2020-03-05 14:40:41 -08:00
Tyler Benson 372ba221d2 Invert the classloader matcher to remove the double negative. 2020-03-05 10:14:33 -08:00
Tyler Benson ee5cf2cf24 Attempt to improve test reliability
Add timeouts (to avoid a gradle level timeout) and retries (since we're doing it manually anyway).

I realize this is a band aid...
2020-03-04 19:02:41 -08:00
dougqh 7a183e755e Switching to per-injection temp dir to avoid race
Upon review, we realized that there was a race not just between processes but also with multiple threads in the same process.

This race happens because of the effort to proactively clean-up directories.

This left two choices...
- assume per-process exclusivity -- and resolve the race with reference counting
- move to a temp dir per injection

This change uses the later strategy which is potentially more expensive but safest.
2020-03-04 15:14:07 -05:00
Trask Stalnaker 166d951a10 Cache is not needed anymore 2020-03-04 09:47:15 -08:00
Trask Stalnaker c63c981221 Remove non-delegating class loader check
This is not needed anymore now that loadClass() is being instrumented to
deal with non-delegating class loaders.
2020-03-04 09:46:20 -08:00
dougqh 4ad51dd9fa Introducing TempDir helper
Introduces a TempDir helper class

This was done to help handle an oversight in the prior per-process temp dir change.  The fallback mode is to use the shared java.io.tmpdir directly.

When using java.io.tmpdir, we don't want to be creating and destorying, since it may be shared.

The new TempDir object is constructed knowing whether the TempDir is per-process or shared -- and the behavior of its prepare and cleanup method change accordingly.

When using a per-process temp dir, the dir is creating and deleted regularly.  When using a shared temp dir, those methods become nops.

Creating TempDir also made it easy to avoid repeatedly calling deleteOnExit in the event that delete fails, so I made that change as well.
2020-03-03 16:08:37 -05:00
dougqh d2ecce477e Switching to per-process temp dir
Switching to create a per-process temp dir as protection against file name collisions.  This is done by introduced TEMP_DIR which is calculated during class initialization.

The current selection process generates a random directory name and sees if that name is availabe in java.io.tmpdir.  If it is that name is selected; otherwise, another name is generated.

If no unique name is found after 10 rounds of generation, the code falls back to the old behavior of writing directly to java.io.tmpdir.
2020-03-03 16:08:29 -05:00
dougqh c50899f184 Creating helper methods for injection
Create helper methods injectBootstrapClassLoader & injectClassLoader.

The directory creation and retry logic that will be added to the handling of the bootstrap will complicated the code.

To keep the code readable, I broke the bootstrap handling into its own method.  To keep the level abstraction consistent, I did the same with injectClassLoader.
2020-03-03 16:08:19 -05:00
dougqh 3417fd8940 Improving debuggability by requestingName
This change adds a requestingName field to help in diagnosing the source of any injection failures.

Usually, the requestingName is the simple class name of the Instrumenter; however, this change doesn't propagate the Instumeneter named through FieldBackedProvider.
2020-03-03 16:08:09 -05:00
Nikolay Martynov a62db5bcad Ignore more spring 2020-03-03 14:51:25 -05:00
Nikolay Martynov 9f1c821d37 Ignore javax.el 2020-03-03 14:51:25 -05:00
Nikolay Martynov 33c8fc0f3a Ignore snakeyaml 2020-03-03 14:51:23 -05:00
Nikolay Martynov 864e2884eb Ignore lucene 2020-03-03 14:51:22 -05:00
Nikolay Martynov e8c31e9dd6 Ignore lagom: we do not instrument it directly 2020-03-03 14:51:22 -05:00
Nikolay Martynov dea3d72cc6 Ignore jsonpath 2020-03-03 14:51:22 -05:00
Nikolay Martynov d5ea1167a6 Ignore h2 2020-03-03 14:51:19 -05:00
Nikolay Martynov 89be6b5c06 Ignore majority of google api
And several other google libraries
2020-03-03 11:45:22 -05:00
Nikolay Martynov d029713740 Ignore org json simple 2020-03-03 11:45:22 -05:00
Nikolay Martynov 78268d1f0f Fix logback 2020-03-03 11:45:22 -05:00
Nikolay Martynov 8cdde847f9 Ignore mustachejava 2020-03-03 11:45:22 -05:00
Nikolay Martynov d74d65175b Ignore majority of cassandra classes 2020-03-03 11:45:22 -05:00
Nikolay Martynov 22e7fe8f82 Add exception for instrumented runnable in logback 2020-03-03 11:45:22 -05:00