Tyler Benson
95a294a560
Remove common (redundant) dependencies
2019-08-06 14:51:04 -07:00
Tyler Benson
9cdf049ca7
Extract ConfigUtils
2019-05-30 09:09:29 -07:00
Tyler Benson
fc9f1d120c
Misc fixes.
2019-05-29 13:54:35 -07:00
Tyler Benson
e260b1d044
Make all http client tests extend HttpClientTest
...
Add flexibility to handle inconsistencies between client integrations.
2019-05-29 13:54:35 -07:00
Tyler Benson
68a68f1057
Ensure that http.url tag doesn’t have query params set
...
Make handling of it more consistent in decorator.
2019-04-26 09:48:34 -07:00
Nikolay Martynov
6fd630831f
Stop using `scopeManager().activate(span, true)`
2019-04-08 11:54:47 -04:00
Nikolay Martynov
bfb48f31c1
Make sure span is opened and closed with scope in http_url_connection
2019-04-05 11:13:53 -04:00
Nikolay Martynov
3b0e769e88
Fix helper injection in context provider
...
Currently helpers will not be injected if instrumentation doesn't
apply. Unfortunately it is possible for some classes to have context
fields added even if instrumentation is not allied (i.g. instrumented
classes are not used). Fix this by always injecting all helpers if we
inject context fields.
2019-03-26 15:53:34 -04:00
Tyler Benson
50279d64fe
Span type should only be an attribute and not inherited
...
Previously we were inheriting from the parent and also often setting as a tag.
Apply default span assertion to verify the spanType is being checked properly. (Include error state too.)
2019-02-28 12:39:51 -08:00
Tyler Benson
1644de3969
Migrate Jax-rs client instrumentation to Decorator
2019-02-27 09:40:08 -08:00
Tyler Benson
678df7b43d
Migrate HttpURLConnection instrumentation to Decorator
2019-02-25 14:48:15 -08:00
Nikolay Martynov
a46d6a2e8f
Use config inheritance in `withConfigOverride`.
...
This moves us forward to abstract 'Config' and away from depending in
specific config data source (e.g. system properties).
2019-02-05 15:51:05 -05:00
Tyler Benson
6aa371d790
Encapsulate config override reflection
2019-02-05 11:30:07 -08:00
Tyler Benson
1a54e8179a
Add setting to set service name by domain for http clients
...
This will allow better metric collection and identification of trends for individual services/hosts.
This is not enabled by default because it can result in a high cardinality of services.
2019-02-05 08:20:49 -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
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
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
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
20993e7e16
Allow tests to run on all JDKs
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