Commit Graph

1373 Commits

Author SHA1 Message Date
Andrew Kent 628f4929dc Muzzle Assertions and gradle plugin 2018-07-10 17:26:49 -04:00
Andrew Kent 541a6998a4 Hook up muzzle to Instrumenter.Default's matcher 2018-07-10 17:26:49 -04:00
Andrew Kent d61f65f4ff Muzzle outline in Instrumenter.Default 2018-07-10 17:26:49 -04:00
Andrew Kent 836f49205b TraceConfigInstrumentation implements Instrumenter directly 2018-07-10 17:26:49 -04:00
Gary Huang 77717d305b
Merge pull request #382 from DataDog/gary/jdbc-cache-investigation
Fixes #379 proxy connection caching issue
2018-07-09 18:19:12 -04: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 c98f400583
Merge pull request #381 from DataDog/ark/new-instrumentation-api
New instrumentation api
2018-07-09 17:34:33 -04:00
Andrew Kent 02a3e6a5d3 New Instrumentation API 2018-07-06 17:17:32 -04:00
Andrew Kent 33a139cdcb New Instrumentation outline 2018-06-28 14:54:14 -07:00
Andrew Kent f8e3ac3097 New instrumentation api outline 2018-06-28 14:54:14 -07:00
Andrew Kent fd2d2d104e Begin v0.11.0 2018-06-28 13:36:54 -07:00
Andrew Kent 749b25aaf1 Version 0.10.0 2018-06-28 12:54:07 -07:00
Andrew Kent 0360bd01ee
Merge pull request #378 from DataDog/ark/cassandra-fix
Remove most shadow relocates
2018-06-27 11:56:33 -07:00
Andrew Kent 3894f829bb Remove most shadow relocates
Shadow relocates are no longer needed because of our new bootstrapping
process.
It's no longer possible for agent dependencies to interfere with the
user's classpath.

The immediate reason for this change is a bug created in the Cassandra
instrumentation.
The Cassandra instrumentation references guava transitive deps from
the datastax driver. These references are re-written by shadow,
causing the instrumentation to reference 'datadog.agent.deps.google.*'
instead of the guava class.
2018-06-27 09:35:54 -07:00
Gary Huang cc7bb7943f
Merge pull request #354 from DataDog/gary/jsp-integration-branch
Generic JSP instrumentation with Tomcat Jasper compilation instrumentation.
2018-06-26 18:35:09 -04:00
Nikolay Martynov 2447f6a99d
Merge pull request #376 from DataDog/mar-kolya/akka-http-server-renames
akka http server renames
2018-06-26 18:10:09 -04:00
Andrew Kent a5276a64df
Merge pull request #373 from DataDog/ark/priority-sampling-fix
priority sampling fix
2018-06-26 14:25:52 -07:00
Nikolay Martynov 8d6392fa94 Remove timeouts from lagom tests
It looks like server is started lazily and on laptop it may take over
5 seconds in parallel build. This means in may take long time on CI as
well.
It is in fact unikely that server will never return so adding timeout
introduces flakiness and doesn't really protect from any real-life
problems. Instead of hardcoding timeouts just rely on build eventually
giving up on its own one way or another.
2018-06-26 15:48:04 -04:00
Nikolay Martynov 44b63ea5ca Rename AkkaHttpInstrumentation to AkkaHttpServerInstrumentation
To be able to put client instrumentation in more consistent way
2018-06-26 15:41:59 -04:00
Nikolay Martynov 3ac866b0f9
Merge pull request #371 from DataDog/tyler/servlet-user
Set servlet’s user-principal as a tag when available
2018-06-26 13:41:13 -04:00
Andrew Kent 4401779aad Fix priority sampling implementation bugs
- use correct sampling flag name
- set sampling rate
- set sampling flags on root span metrics only
- tests to assert correct behavior
2018-06-26 10:19:28 -07:00
Andrew Kent 224f65a0c2 rootSpan hack for PendingTrace 2018-06-26 10:19:28 -07:00
Andrew Kent 6bbe611114
Merge pull request #375 from DataDog/ark/akka-http-rename
Akka-http-server renames
2018-06-26 10:16:44 -07:00
Andrew Kent 15c0f9a6b2 Akka-http-server renames 2018-06-26 09:55:32 -07:00
Nikolay Martynov 088402beed
Merge pull request #358 from DataDog/mar-kolya/fix-span-time-boundaries-poc
Fix span time boundaries
2018-06-26 12:48:49 -04:00
Nikolay Martynov 32a57162df
Merge pull request #372 from DataDog/tyler/gradle-upgrade
Upgrade to gradle 4.8.1
2018-06-26 12:37:21 -04:00
Tyler Benson 05ef9ce8bd
Merge pull request #374 from DataDog/mar-kolya/add-servlet-auth-tests
Add tests to servlet intrumentation to verify that username is set co…
2018-06-26 15:16:49 +10:00
Nikolay Martynov a0d99e70fb Add tests to servlet intrumentation to verify that username is set correctly 2018-06-25 21:54:20 -04:00
Tyler Benson 17c2f28947 Upgrade to gradle 4.8.1 2018-06-26 10:33:35 +10:00
Gary Huang 46e7036701 fix version scan and test versions 2018-06-25 16:54:45 -04:00
Nikolay Martynov d50154f159 PendingTrace: add a TODO to move time fields into DDTracer 2018-06-25 09:28:01 -04:00
Tyler Benson 9899256381 Set servlet’s user-principal as a tag when available 2018-06-25 11:24:35 +10:00
Gary Huang eddb48f3e2 refactored tests, added parent-children relationship between spans in tests. Still need to figure out version scan and versions to support. 2018-06-22 18:24:06 -04:00
Gary Huang e90bcf624a add unit tests for jsp rendering (servicing requests), change to instrument generic jsp level rendering. 2018-06-22 18:24:06 -04:00
Gary Huang b1d06299cc JSP instrumentation
WIP: more unit tests to come
2018-06-22 18:24:06 -04:00
Nikolay Martynov 2bdf54bd6e Fix span start boundaries
Before: span start had millisecond precision because we just use
`currentTimeMillis` to get span start time.

This creates weirdly looking traces where spans 'fly' way out of
parent spans if they have sub-ms length.

After: we establish 'trace start time' with millisecond precision and
measure all span start and stop times from that. This means all
relative times are maintained with nanosecond precision (or whateve OS
clock fives us).

This is POC and some things are not yet fixed. E.g. JMS1
instrumentation injects time into span manually - and it is not
apparent how to pake it do so relative to trace clock.

Note: going forward this should allow us to completely get rid of
'double time keeping' we currently have in `DDSpan`.
2018-06-22 17:17:53 -04:00
Nikolay Martynov 7405b7711b
Merge pull request #369 from DataDog/mar-kolya/increase-timeouts-in-url-connection-test
Increase timeouts in UrlConnection test
2018-06-22 17:17:04 -04:00
Nikolay Martynov 517b779ac3
Merge pull request #368 from DataDog/mar-kolya/fixes-for-lettuce-tests
More fixes to Lettuce tests
2018-06-22 17:11:13 -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
Nikolay Martynov 1fbb33d182 More fixes to Lettuce tests
Lettuce intrumentatio is implemented in a way that after operation has
been performed `span` is not closed syncronously - in fact this happens
on separate thread. This means `spans` for even syncronous operations
may be closed on opposite order.
This means that writing tests that pefrom two operations and expect
two traces is slightly more complicated. In many places we can just
avoid doing that by preparing necessary data in `setup`.

This fixes some of the false negatives in tests.
2018-06-22 16:44:58 -04:00
Nikolay Martynov 770f77a7ff
Merge pull request #367 from DataDog/mar-kolya/reduce-number-of-compile-workers
Reduce number of gradle workers during compile
2018-06-22 16:07:46 -04:00
Andrew Kent 8a666784a6 Close Jetty Handler scope 2018-06-22 11:53:39 -07:00
Nikolay Martynov 7882e4fe23 Make ES tests more deterministic by using listener pool with 1 thread
This should reduce number of false negatives in ES tests
2018-06-22 14:23:06 -04:00
Nikolay Martynov 8445409944 Reduce number of gradle workers during compile
This should prevent OOM errors
2018-06-22 11:41:02 -04:00
Nikolay Martynov c050b4acd8
Merge pull request #366 from DataDog/mar-kolya/fixes-for-lettuce-tests
Fix some flakiness in Lettuce tests
2018-06-22 11:01:30 -04:00
Nikolay Martynov 389f65687a Fix some flakiness in Lettuce tests
It looks like automatic reconnection was enabled which lead to random
traces popping up in random places when Redis server was shutdown.

Also make sure that server persists only during single test to weedout
all inter-test dependencies.
2018-06-21 17:44:19 -04:00
Nikolay Martynov 1f5ece8f5a
Merge pull request #360 from DataDog/mar-kolya/improve-jms1-receive-handling
Improve jms1/jms2 receive handling
2018-06-21 14:51:49 -04:00
Nikolay Martynov 79d7b9c062 JMS1/2: change resource names according to PR comments 2018-06-21 14:10:50 -04:00
Nikolay Martynov 37fdbf9188 JMS2: Fix `receiveNoWait` instrumentation and instrument `receive(timeout)` 2018-06-21 13:28:19 -04:00