Commit Graph

34 Commits

Author SHA1 Message Date
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
Nikolay Martynov 0a3ecc1b90 Improve HttpUrlConnection instrumentation
Make sure we get one span per request
2018-12-04 16:54:48 -05: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
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 131074c255 Move InstrumentationContext api to bootstrap 2018-10-18 10:16:15 -07:00
Andrew Kent b02ed4e813 Initial Map-backed implementation and test 2018-10-17 15:29:59 -07:00
Andrew Kent 7330ceaf4e Instrumentation Context outline for HttpURLConnection as an example 2018-10-15 11:05:23 -07: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
Nikolay Martynov a4cded9b4f Add some tests for distributed tracing in Tomcat and Jetty 2018-08-18 13:38:06 -04:00
Tyler Benson 3fc2738179 Improve test coverage and reduce duplication 2018-08-17 10:36:45 +10:00
Tyler Benson 0b6c1bc3d3 Fix tests for Java 7, 9, and 10 2018-08-16 14:23:58 +10:00
Tyler Benson e07dfffe5f Migrate tests to new TestHttpServer 2018-08-16 14:23:58 +10:00
Tyler Benson 3f2ec7dc48 Move to separate packages 2018-08-16 12:24:27 +10:00
Tyler Benson 84d38a8270
Merge pull request #439 from DataDog/tyler/method-signatures
Cleanup method signatures and servlet 2 instrumentation
2018-08-13 17:29:02 +10:00
Tyler Benson f801cbd466
Merge pull request #428 from DataDog/tyler/use-WeakConcurrentMap
Use WeakConcurrentMap
2018-08-13 16:44:16 +10:00
Tyler Benson 4583d12b31 Cleanup method signatures and servlet 2 instrumentation
adding the abstract servlet instrumentation reduces code duplication and makes it more similar to servlet 3 instrumentation.
2018-08-13 15:14:10 +10:00
Tyler Benson eacc2d6402 Restructure how WeakMap is implemented
Use an interface.
Use a provider/supplier to avoid loading more onto the bootstrap classpath.
2018-08-08 16:54:44 +10:00
Tyler Benson 847484cd47 Use WeakConcurrentMap
Instead of `Collections.synchronizedMap(new WeakHashMap<>())`.
2018-08-06 14:14:57 +10:00
Tyler Benson e7aa7c52b4 Improve comments and add synchronization. 2018-08-06 11:38:28 +10:00
Tyler Benson 064ae4c238 Separate span for input and output streams. 2018-08-03 15:41:16 +10:00
Nikolay Martynov c66bd24d3a Use `safeHasSuperType` instead of `isSubType`
`isSubType` may fail on certain class lookup problems, even on classes
unrelated to given instrumentation, preventing instrumentation from
being applied.
2018-07-31 20:14:03 -04:00
Andrew Kent ee594f8567 Use connect operationName in httpurlconnection connect-first case 2018-07-26 15:34:27 -07:00
Andrew Kent 54485c3296 Don't trace httpurlconnection as a top-level trace 2018-07-26 15:34:27 -07:00
Andrew Kent d598515d09 Handle cases where connect() is called first 2018-07-26 15:34:27 -07:00
Andrew Kent df95af53a7 Remove getResponseCode() from httpurlconneciton instrumentation 2018-07-26 15:34:27 -07:00
Andrew Kent 2a35ecb497 Use connected field to determine io status of httpurlconnection 2018-07-26 15:34:27 -07:00
Gary Huang 2780ac7ac1 POC sun JDK http urlconnection instrumentation, currently creates one span. 2018-07-26 15:34:27 -07:00
Nikolay Martynov d4d770fe42 Pull out ratpack helper into seprate class to avoid copy-paste 2018-07-23 10:04:53 -04:00
Andrew Kent 02a3e6a5d3 New Instrumentation API 2018-07-06 17:17:32 -04:00
Nikolay Martynov 60a0722390 Increase timeouts in UrlConnection test
Before those timeouts where set to 10ms which legitimatelly can come
before server (even localhost) has a chance to reply with 'connection
refused'.

This should fix flaky test.
2018-06-22 16:57:31 -04:00
Tyler Benson c2771753b7 Suggested changes. 2018-06-08 16:38:51 +10:00
Nikolay Martynov 28c7c30af4 [HttpUrlConnection] Fix HEAD responses
Explain to ratpack that sending body for HEAD requests is not up to
spec [1] and seems to be confusing to clients. This resolves 'Keep-Alive'
mistery and makes disabling 'keepa-live' unnecessary.

[1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
2018-06-07 12:24:16 -04:00
Tyler Benson 9ff09b93e1 Refactor HttpUrlConnection Instrumentation
getOutputStream shouldn’t call getResponseCode, otherwise the request gets screwed up.
2018-06-07 16:25:38 +10:00