Commit Graph

39 Commits

Author SHA1 Message Date
Tyler Benson 2743e64fd3 Exclude more weird versions. 2020-04-20 21:59:24 -04: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
Anubhaw Arya 0344cff386 Remove hostname and port from HttpClientDecorator 2020-03-13 10:47:10 -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 e0b46da375 Improve consistency of `@Advice.OnMethodExit` params
And ordering of some `helperClassNames`
2020-03-10 13:11:22 -07:00
Tyler Benson 372ba221d2 Invert the classloader matcher to remove the double negative. 2020-03-05 10:14:33 -08:00
Tyler Benson 7702b0585b Add Classloader precheck to expensive matchers.
Benchmark results:
```
Benchmark                                                             Mode  Cnt   Score   Error  Units
ClassRetransformingBenchmark.WithAgent.testTracedRetransform          avgt       21.933          ms/op
ClassRetransformingBenchmark.WithAgent.testUntracedRetransform        avgt        6.171          ms/op
ClassRetransformingBenchmark.WithAgentMaster.testTracedRetransform    avgt       22.129          ms/op
ClassRetransformingBenchmark.WithAgentMaster.testUntracedRetransform  avgt        6.517          ms/op
ClassRetransformingBenchmark.testTracedRetransform                    avgt        0.876          ms/op
ClassRetransformingBenchmark.testUntracedRetransform                  avgt        0.867          ms/op
```

I also saw a small improvement in application startup time.
2020-03-03 10:29:10 -08:00
Tyler Benson 35e00686b3 Imply not(isInterface()) call for expensive matchers
Also remove from simple named("some.name") matchers to avoid metadata lookup.
2020-02-27 12:13:42 -08:00
Tyler Benson bd82166b58 Rename methods that don't require disambiguation. 2020-02-24 08:35:19 -08:00
Tyler Benson f70c35842d Move matchers to separate package and split matcher classes out 2020-02-24 08:31:12 -08:00
Laplie Anderson d45ead1284 split matching into safeExtendsClass and safeHasInterface 2020-02-19 21:22:17 -05: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
dougqh 6b096c2240 Replacing Advice.class references
Replacing Advice.class references with string construction.

This stops the JVM from loading the Advice classes which are used as templates for byte buddy and doesn't ever need to be run directly.

This eliminates ~130 class loads at start-up -- and saves 0.5MiB in metaspace
2019-11-18 16:09:30 -05:00
Tyler Benson a8ca47ed03 Skip spring controller and dropwizard trace if no trace present
Also prefer early return instead of deep nesting for null check.
2019-10-24 14:40:08 -07:00
Trask Stalnaker 0107551c0e Remove outdated comment 2019-10-21 18:36:14 -07:00
Trask Stalnaker 887633f086 Update apache-httpclient-4 to new agent api 2019-10-19 16:52:37 -07:00
Laplie Anderson 3ae2bc73d8 Add instrumentation for all of ApacheHttpClient methods 2019-10-18 12:55:23 -04:00
Laplie Anderson 6b2a4d996b Add (failing) tests for methods that were not instrumented 2019-10-17 16:09:37 -04:00
Nikolay Martynov 0748c10b72 Avoid unnecessary objects creation in Apache Http Client instrumnentation 2019-09-17 10:19:38 -04:00
Tyler Benson 95a294a560 Remove common (redundant) dependencies 2019-08-06 14:51:04 -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
Tyler Benson 9ad06a6791 Add instrumentation for Apache HttpAsyncClient
Extract http client tests to shared class.
2019-04-23 17:10:40 -07: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 93e38f6f0d Rename and static import decorators instance
In the instrumentation it reads better.
2019-02-22 13:44:34 -08:00
Tyler Benson 13e708ec42 Akka and Apache HttpClient migrate to decorators 2019-02-20 17:02:05 -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
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
Tyler Benson ebf0d86734 Add Muzzle testing for dropwizard-client 2018-10-11 14:21:39 +10:00
Tyler Benson 6fdcfc783a Keep operation name the same 2018-10-01 14:28:14 -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
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