Commit Graph

29 Commits

Author SHA1 Message Date
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
Nikolay Martynov b1d314aff1 Specify types in jaxrs mtcher to help Idea with type inference 2020-02-21 11:34:25 -05:00
Laplie Anderson d45ead1284 split matching into safeExtendsClass and safeHasInterface 2020-02-19 21:22:17 -05:00
Nikolay Martynov 02fb8d8888 Fix JaxRs matching
Paranthesys was missplaced leading to more complicated matcher than needed
2020-02-18 18:42:36 -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
Laplie Anderson 8cae56219b Adding some implementation comments 2019-12-10 18:28:21 -05:00
Laplie Anderson f836f8976a Combine onControllerStart and onAbort 2019-12-10 18:07:26 -05:00
Laplie Anderson 73062199b0 Move constants to decorator 2019-12-10 14:00:31 -05:00
Laplie Anderson 5d2d19af75 Rename class since they instrument the context 2019-12-10 14:00:31 -05:00
Laplie Anderson 54ba905224 Add a Resteasy 3.1 test set 2019-12-10 14:00:31 -05:00
Laplie Anderson 498d2bd461 Add ContextRequestFilter instrumentation to JAX-RS 2019-12-10 14:00:31 -05:00
Tyler Benson 55fe3ba228 Move dropwizard tests to dropwizard project
This separate directory helps to avoid conflicts with JerseyTest.
ResourceTestRule usage in JerseyTest was causing some odd interactions which resulted in traces not being reported.
2019-12-10 10:08:04 -08:00
Laplie Anderson fa14af40c3 Fix muzzle issue with async instrumentation 2019-12-06 18:18:34 -05:00
Laplie Anderson d2db6b6fd9
Merge pull request #1098 from DataDog/tyler/jax-rs-annotation-inheritance
Support JAX-RS Annotation Inheritance
2019-12-06 13:49:46 -05:00
Trask Stalnaker 1987e86ebf Normalize tag verification order 2019-11-22 10:59:45 -08:00
Laplie Anderson f1362a7d57
Merge branch 'master' into tyler/jax-rs-annotation-inheritance 2019-11-21 12:51:01 -05:00
Laplie Anderson aa46e81e19 Copy instrumentation to jax-rs2 2019-11-20 15:38:17 -05: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
Laplie Anderson bf4587c23d Missed a few test helper methods 2019-11-04 12:49:35 -05:00
Tyler Benson 8e48a70c6d Fix jax-rs Path annotation inheritance
Turns out the class level path annotation overrides parent classes, so we only need to find the nearest one.

We also need to look from the instance’s class, not from where the method is defined.

Commented out a test case because we still need to compile against java 7.  That case will be added back when we upgrade to java 8.
2019-10-30 11:39:06 -07:00
kfujita b0e7e6a3f9 - fix test compile setting
- code format with google formatter
2019-10-30 08:57:13 -07:00
kfujita d8bd12bef8 This patch fixes NPE in jaxrs instrument which occurs when we use interfaces with default method and its impl class.
- reproduce NPE error with JaxRs class and interfaces in JavaInterfaces
- fix the logic target class of method with @Path annotation to avoid NPE
- setting java 1.8 for jaxrs's test
2019-10-30 08:57:13 -07:00
Tyler Benson df387b486a
Merge pull request #1064 from DataDog/tyler/spring-controller-refactor
Refactor JAX-RS Annotation and Spring Controller/Handler Instrumentation
2019-10-25 14:44:07 -07:00
Tyler Benson fa80fee15d Refactor JAX-RS Annotation and Spring Controller/Handler Instrumentation
For spring:
* Move more logic to the decorator.
* Use a fixed operation name, but set the resource name.
* Rename the root span instead of the parent span (If there are other spans in between this could make a difference.)  Not sure what impact this would have if multiple controllers are called (ie, forward/include).

For Jax-rs:
* Rename the root span instead of the parent span (same concern as above with spring)
2019-10-25 10:19:25 -07:00
Tyler Benson 7ae5de1fc6 Refactor Servlet Advice
Moving directory structure around.
Combining advice, trying to make it propagate better.
2019-10-25 10:09:19 -07:00
Trask Stalnaker 5ce96d905b Update jax-rs-annotations-2 to new agent api 2019-10-19 16:52:40 -07:00
Tyler Benson 828e21123c Remove debug println
Co-Authored-By: Laplie Anderson <randomanderson@users.noreply.github.com>
2019-10-07 14:19:46 +02:00
Tyler Benson 82180c2ea6 Add support for jax-rs AsyncResponse 2019-10-07 14:19:46 +02:00