Commit Graph

251 Commits

Author SHA1 Message Date
Tyler Benson ce006e1405 Ensure RequestDispatcher span is part of expected trace 2020-04-14 14:56:16 -04:00
Tyler Benson 64161d93c9 Add instrumentation to detect the route at the beginning of the spring request
Instead of waiting till the handler is called, otherwise if a response is returned by a filter then the proper name wouldn't be set and would fall back to the URL.
2020-04-14 14:19:14 -04:00
Tyler Benson 07f99a98d8
Merge pull request #1221 from DataDog/tyler/trace-processor
Add TraceProcessor and move some existing functionality to rules
2020-04-14 13:33:46 -04:00
Nikolay Martynov f4c9b73b02 Add thread utils to bootstrap so instumentations could use them 2020-04-14 11:47:40 -04:00
Tyler Benson 97efa307d3 Stop setting error tag and update tests. 2020-04-13 13:59:11 -04:00
Brian Devins-Suresh de4b6d7733
Merge pull request #1320 from DataDog/tyler/http-client-testing
Add tests for http clients
2020-03-25 16:08:26 -04:00
Nikolay Martynov e5caa48364 Add netty server logging in tests 2020-03-24 15:16:09 -04:00
Nikolay Martynov fee6d942e8 Add okhttp request logging in tests 2020-03-24 14:52:07 -04:00
Laplie Anderson cef6da61dc
Revert "Add config to capture stacktrace when a span duration exceeds threshold" 2020-03-23 19:13:29 -04:00
Lev Priima a5a5743f7c
WeakCache instead of WeakMap (#1256)
WeakCache abstraction in addition to WeakMap
2020-03-20 00:23:07 -07:00
Tyler Benson 7e6cb44ec6 More fixes 2020-03-16 12:26:36 -07:00
Tyler Benson d86cb51aaa Fix more tests and extract timeout values to constant 2020-03-16 09:10:06 -07:00
Tyler Benson 25464456d3 Add tests for http clients
- dropped request
- non-routable request
- https request

Unfortunately I wasn't able to figure out a clean way to test some of these scenarios without making a remote request.
I was also not able to configure everything consistently, so I had to disable that test for several integrations.
2020-03-13 15:05:16 -07:00
Laplie Anderson 7df5cfe3e3
Merge pull request #1311 from DataDog/landerson/helpers-to-bootstrap
Move common helper classes to bootstrap
2020-03-12 13:50:57 -04:00
Tyler Benson 060c05671e
Merge pull request #1160 from DataDog/tyler/stacktrace
Add config to capture stacktrace when a span duration exceeds threshold
2020-03-12 10:45:20 -07:00
Laplie Anderson 6411ee358f Remove Http*Decorators from method signatures in tests 2020-03-12 13:13:17 -04:00
Laplie Anderson 6cd530a541 Move decorators to bootstrap 2020-03-11 18:41:29 -04:00
Tyler Benson 2b74487ed6 Add config to capture stacktrace when a span duration exceeds threshold
(But only when span is not errored or finished on a different thread.)

Use the following config:
```
-Ddd.trace.span.duration.stacktrace.millis=1000
```
(One second is the default, 0 disables.)
2020-03-10 13:18:22 -07:00
Tyler Benson e0b46da375 Improve consistency of `@Advice.OnMethodExit` params
And ordering of some `helperClassNames`
2020-03-10 13:11:22 -07:00
Laplie Anderson d14adcf712 Chunked encoding didnt work as expected 2020-03-04 18:08:32 -05:00
Laplie Anderson 0c74cf031e Extract common play-ws code and add stream tests 2020-03-04 10:38:36 -05:00
Laplie Anderson 525738b177 Add http client test for chunked responses 2020-03-04 10:34:46 -05:00
Nikolay Martynov dedfc7dd0b Make ignired classes test assertion more informative 2020-03-03 11:45:22 -05:00
Nikolay Martynov e22ce02762 Add test for ignore matchers for libraries 2020-03-02 16:37:39 -05:00
Nikolay Martynov a04cc15ce8 Fix some tests 2020-02-14 12:59:30 -05:00
Laplie Anderson 3c0877e38a Create a shared parent classloader 2020-02-11 11:42:39 -05:00
Tyler Benson 032f22f5a6
Reduce tracer thread count by combining scheduled executors int… (#1200)
Reduce tracer thread count by combining scheduled executors into a single executor.
2020-02-11 08:18:59 -08:00
Tyler Benson 51bffa2e8a Move agent api classes to bootstrap package so they're not analyzed by muzzle
Also move jdbc classes to bootstrap to reduce size and complexity of those reference checkers.

These changes reduce the total file size of these instrumentation classes by 635k, which should also result in decent memory savings.
2020-02-10 15:09:15 -08:00
Tyler Benson 75c7769192 Reduce tracer thread count by combining scheduled executors into a single executor.
Pulls out utility classes for reuse by other projects.

This also meant the dependency had to be bundled with dd-trace-ot since it isn't published as a separate dependency.
2020-02-10 10:45:58 -08:00
Lev Priima 5265a43c6d Reduce use of Thread::setContextClassLoader 2020-02-06 22:53:04 -05:00
Tyler Benson cab139e905 Upgrade OkHttp client to 3.12.8 2020-02-04 15:06:44 -08:00
Tyler Benson e31cbd6c89 Add Builder to DDTracer
Deprecate previous constructors.
2020-01-14 17:44:34 -08:00
kfujita 0f3125498c add test case 2019-12-19 13:33:03 +09:00
Tyler Benson 99992df998 Fix tagging query string for additional servers
Add test to common test suite and adapt each test.
2019-12-17 09:33:27 -08:00
Trask Stalnaker 1987e86ebf Normalize tag verification order 2019-11-22 10:59:45 -08:00
Nikolay Martynov 42cece67c2 Fix namespace clashes
Using `datadog.trace.agent` to hold agent class causes problems due to
shadowing into this package of other classes.
2019-11-06 13:58:20 -05:00
Nikolay Martynov 15c1e67334 Fix agent on latest zulu8
The problem was that on zulu8 loading OkHttp touches JFR which in turn
touches log manager - which would break things like JBOSS.

The fix is to delay installing agent (and writer) until log manager
things have settled down - in way similar to jmxfetch.

Unfortunately for 'main' agent this turns out to be more involved
because of classloader shenanigans.
2019-11-06 10:09:50 -05:00
Laplie Anderson bc2978e8d8 Use groovy literals for BigInteger 2019-11-04 16:16:03 -05:00
Laplie Anderson bf4587c23d Missed a few test helper methods 2019-11-04 12:49:35 -05:00
Laplie Anderson cfc19facf5 Change String ids to BigInteger ids 2019-11-04 11:21:32 -05:00
Laplie Anderson 8a2594eeab Add "testCircularRedirects" option to HttpClientTest 2019-10-30 18:17:49 -04:00
Trask Stalnaker da80be693c Switch to new Tags class in testing module 2019-10-24 21:05:01 -07:00
Trask Stalnaker a45dc34c5c Remove testing module dependencies on GlobalTracer 2019-10-24 21:05:00 -07:00
Trask Stalnaker 299c396eab Update testing module to new agent api 2019-10-19 16:52:43 -07:00
Tyler Benson 126dc67181 Update AgentApi to OT 0.32.0 2019-10-17 14:11:07 -07:00
Tyler Benson 757961e014 Initial implementation of agent internal API. 2019-10-15 15:40:44 -07:00
Tyler Benson 9ef3332140 Extract base test class and move Config class changes there. 2019-10-07 18:51:25 +02:00
Tyler Benson 82180c2ea6 Add support for jax-rs AsyncResponse 2019-10-07 14:19:46 +02:00
Laplie Anderson e6c061f841
Merge pull request #996 from DataDog/landerson/couchbase-op-id
Add operation id and network tags to Couchbase
2019-09-19 15:56:59 -04:00
Laplie Anderson 43cbf7a16a Split traces and add timeout to blockUntilChildSpanFinished 2019-09-18 17:14:52 -04:00