Tyler Benson
4f853f5f0c
Rename config key for beta/experimental instrumentation.
...
Postfix the existing config names with `-beta` for `servlet` and `jdbc`.
To avoid any risk that the config was explicitly enabled for an unrelated reason resulting in unexpected behavior when upgrading to the latest version.
2019-11-04 13:41:33 -08:00
Tyler Benson
a3a1467192
Add span when calling DataSource.getConnection with a trace.
...
Disabled by default, and only creates a span if existing trace detected.
To enable:
* System Property: `-Ddd.integration.jdbc.enabled=true`
* Environment Variable: `DD_INTEGRATION_JDBC_ENABLED=true`
(Or more specifically with `jdbc-datasource`.)
2019-10-25 16:02:39 -07:00
Trask Stalnaker
8c558fa00e
Format
2019-10-24 21:05:01 -07:00
Trask Stalnaker
e32bf1816a
Organize imports
2019-10-24 21:05:01 -07:00
Trask Stalnaker
86bd9793bd
Switch to new Tags class in instrumetation
2019-10-24 21:05:00 -07:00
Trask Stalnaker
9182b64078
Switch to new Tags class in tests
2019-10-24 21:04:57 -07: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
308409f856
Update jdbc to new agent api
2019-10-19 16:52:41 -07:00
Tyler Benson
9ef3332140
Extract base test class and move Config class changes there.
2019-10-07 18:51:25 +02:00
Laplie Anderson
3323bbc5b1
java.sql classes are not always present
2019-09-04 13:11:03 -04:00
Laplie Anderson
457410ea4e
Run all tests on all java version
2019-09-03 13:03:16 -04:00
Tyler Benson
95a294a560
Remove common (redundant) dependencies
2019-08-06 14:51:04 -07:00
Tyler Benson
747f758a70
Remove default instance
...
It’s not very interesting and breaks the definition of “instance” when we want to see the db name when no instance name is defined.
2019-07-15 12:52:57 -07:00
Tyler Benson
2c240754fc
Additional testing for split-by-instance config
...
Some DB’s don’t define an instance, so verify the setting has no effect for them.
2019-06-14 10:08:17 -07:00
Tyler Benson
a4d53b0dcd
Update Cassandra Tests and more instance name cleanup
2019-06-13 15:55:40 -07:00
Tyler Benson
3c68c09101
Review fixes.
2019-06-11 11:12:50 -07:00
Tyler Benson
4469c7fb11
separate out driver subtype
...
to avoid changing existing service names
2019-06-10 16:17:36 -07:00
Tyler Benson
0807598d16
Populate settings from properties and add MariaDB alt styles
2019-06-10 12:02:14 -07:00
Tyler Benson
ec60d679d6
Add Oracle support and fix muzzle.
2019-06-06 18:03:56 -07:00
Tyler Benson
6100443443
Attempt to properly parse out instance name from JDBC url
...
Unfortunately implementations are INCREDIBLY inconsistent on the matter. Oracle implementation is still pending since it’s really complicated.
2019-06-05 18:01:33 -07:00
Tyler Benson
d90a3c47ae
Restrict derby version
...
Lastest version requires Java 9+, so we can’t test against it for now.
2019-03-11 14:26:58 -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
c46909e59f
Migrate JDBC instrumentation to Decorator
2019-02-26 11:16:35 -08:00
Tyler Benson
bbcd2f6949
Move other Utils to utils package
2019-02-05 11:43:05 -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
3ef347f00f
Use safeHasSuperType instead of isSubTypeOf
2018-12-27 10:33:43 -08:00
Tyler Benson
471d8c4410
Properly capture callable statement queries
...
CallableStatement is a sub type of PreparedStatement. Previously we were only matching methods that returned exactly PreparedStatement.
2018-12-21 14:03:33 -08:00
Tyler Benson
9bd2b86d2e
Add assertion to ensure latestDepTest dependencies are different from test.
2018-11-12 08:15:24 -08:00
Nikolay Martynov
15024915bf
Catch `AbstractMethodError` when trying to unwrap jdbc connection
...
jdts throws this exception since they just have 'stub' umplementation.
2018-11-01 09:57:18 -04:00
Nikolay Martynov
8a066de772
Add logging in jdbc instrumentation when we cannot unwrap connection
2018-10-31 13:38:37 -04:00
Tyler Benson
192b0fd478
misc minor changes
2018-10-22 10:44:04 +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
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
Tyler Benson
e11ab12284
Better error handling for older JDBC drivers
...
that don’t support unwrapping (pre JDK 1.6).
2018-09-18 16:46:08 +10:00
Tyler Benson
b3222009ef
Stop sending params with AWS traces
...
can potentially contain sensitive data.
(See #461 )
2018-09-07 08:55:24 +10:00
Tyler Benson
3f2ec7dc48
Move to separate packages
2018-08-16 12:24:27 +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
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
Nikolay Martynov
1ebe4732f8
Stop using `failSafe` matcher
...
It should not be necessary after we jave fixed class location issue
for ByteBuddy
2018-07-31 20:12:17 -04:00
Tyler Benson
e6da80bb12
datastores
2018-07-31 12:53:50 +10:00
Tyler Benson
ff9ef671f3
Apply formatter on groovy files.
2018-07-31 12:09:28 +10:00
Tyler Benson
12a2fce96d
Upgrade java formatter version.
2018-07-19 14:10:53 +10:00
Gary Huang
bfc49e869e
Make connections always close on test case completion.
2018-07-09 17:55:52 -04:00
Gary Huang
6bd7cf0675
Fixes #379 .
...
Connection pools were creating proxy connection objects, so the proxy objects were cached. By unwrapping the proxies, the connection objects will be correctly cached and identified.
Refactored tests to use connection pools, and hsqldb connections only on statements (since they will not make a USER() query in a getMetaData call).
2018-07-09 17:55:52 -04:00
Andrew Kent
02a3e6a5d3
New Instrumentation API
2018-07-06 17:17:32 -04:00
Gary Huang
71396aee01
Moved JDBC integration tests to become unit tests
2018-05-15 16:37:55 -04:00
Gary Huang
38dfe96eb0
Fixed java 9 JDBC integration test issue.
...
Refactored JDBCMaps's getDBInfo utlity function because JDBCMaps is in the bootstrap classloader, and the use of java.sql.* packages in getDBInfo is failing because java.sql.* packages are part of the platform classloader in java 9.
2018-05-15 16:18:55 -04:00
Gary Huang
4b71a21487
Fixed unknown database issue from JDBC Connection constructor exception
...
Client will now report correct database if JDBC connection is recovered from exception.
2018-05-15 16:18:55 -04:00
Tyler Benson
5e6259233e
Remove some other unknowns.
2018-05-08 16:29:55 +10:00
Tyler Benson
c1ac920e97
Change from enum to object for map lookup key
2018-05-07 13:25:08 +10:00