Commit Graph

17 Commits

Author SHA1 Message Date
dougqh 680c4426bc Changing muzzle spec to depend on spring-data again 2019-09-23 16:14:56 -04:00
dougqh a242e088de codeNarc - removed unused import of @Shared 2019-09-23 15:54:44 -04:00
dougqh 8a89547004 googleJavaFormat 2019-09-23 15:29:15 -04:00
dougqh 6b5acc8386 New Approach - instrument RepositoryFactorySupport
This revised version targets spring-data RepositoryFactorySupport rather than spring-tx

This is accomplished by injecting a RepositoryProxyPostProcessor during construction that adds a datadog specific MethodIntercptor.

In the end, this functions similarly to the tx support in that it uses a widely scoped MethodInterceptor.

This required some changes to the test as well.  The old test set-up the repository before the instrumentation was fully-enabled.  Enabling the instrumentation earlier capture extra traces where Spring JPA performs metainfo queries.
2019-09-23 15:26:18 -04:00
dougqh 7c5e74bdf0 Cleaning-up decorator
The SpringDataDecorator is really for Spring transactions including non-DB related transactions.

The SpringDataDecorator never really implemented DB or ORM support anyway, since most of the methods just returned null.

Changing the decorator to just extend ClientDecorator instead.  Also rename to reflect its true purpose.
2019-09-17 10:51:30 -04:00
dougqh 172ff747cb Updating muzzle spec
Switching muzzle to target spring-tx rather than spring-data (which is logical given the instrumentation point)

Also added extraDependency on aopalliance
This restricts the support the Spring 2.5 when spring-tx & spring-aop using aopalliance were introduced.
2019-09-17 10:06:43 -04:00
dougqh e43baf82be Renaming advice class
Renaming advice class to more accurately reflect what is being instrumented
2019-09-17 09:27:39 -04:00
dougqh 85389b48d8 Google Format 2019-09-17 08:24:57 -04:00
dougqh 0c3e0579b2 Switching to instrumenting transaction support
After experimenting with RepositorySupport$QueryExecutorMethodInterceptor switched to TransactionInterceptor.

QueryExecutorMethodInterceptor was too narrowly scoped and didn't capture the UPDATE or DELETE statement.  TransactionInterceptor captures everything, but is still a bit more broadly applicable than I'd like.
2019-09-17 08:19:42 -04:00
dougqh 122533fde6 Switching to simple concat for efficiency 2019-09-16 11:08:37 -04:00
dougqh d2ba6af80c Removing unneecessary dependencies
Removing dependencies rendered redundant by clean-up in datadog repo - as per review comment
2019-09-11 14:29:34 -04:00
dougqh ab52988ced Removing "Modified by SignalFx" 2019-09-11 11:33:14 -04:00
dougqh 60e9cc249c Removing "Modified by SignalFx"
Removing "Modified by SignalFx" comments, since our integration is current the same.

Added a comment to SpringJpaTest explaining the differences.
2019-09-11 11:23:49 -04:00
dougqh 7a366f0f01 Added explanatory comments to test
Added some explanatory comments for each span -- might turn these into assertions later

Primary aim was to understand the differences from the signalfx fork.  They seem to stem deviations in the underlying JDBC integration.
2019-09-11 09:55:40 -04:00
dougqh 1335296975 Fixing mismatches in spans collected by signalfx fork & datadog
There are two main differences...
- "hsqldb" vs "spring-data" as the root test service name
- an extra seemingly spurious sql span in signalfx
2019-09-10 17:42:49 -04:00
dougqh 6d38831252 Merge branch 'master' into dougqh/spring-data
Tweak partially picked from signalfx -- that commit included same other unwanted changes in this file and others (see 636c23ed2c)
2019-09-10 17:40:36 -04:00
Ryan Fitzpatrick 5f7e0609ed Initial spring data instrumentation 2019-09-10 15:13:20 -04:00