Commit Graph

3552 Commits

Author SHA1 Message Date
Tyler Benson 0a89f2a57c Extract DDAgentResponseListener from DDApi.
Reduce references to DDApi
2019-12-20 14:49:31 -08:00
Tyler Benson 24e2fe6da7 Move DDApi and rename to DDAgentApi
Reduce visibility back to what it was before refactoring.
2019-12-20 14:36:45 -08:00
Tyler Benson 84f9d80258 Extract TraceSerializingDisruptor class from DDAgentWriter 2019-12-20 14:22:32 -08:00
Tyler Benson 97ed587547 Extract TraceConsumer from DDAgentWriter
Unfortunately this required making some things public that were previously private or package visible.  I expect this to be temporary.
2019-12-20 14:17:33 -08:00
Tyler Benson 8fdd30d3ed Make TraceConsumer a static class 2019-12-20 13:41:09 -08:00
Tyler Benson 2ea76494f8 Extract DisruptorEvent and EventTranslator classes from DDAgentWriter 2019-12-20 13:40:38 -08:00
Tyler Benson 6e57041a6a Extract Monitor classes from DDAgentWriter 2019-12-20 12:09:14 -08:00
Laplie Anderson 7920a25b7e
Merge pull request #1152 from DataDog/landerson/decorator-flag
Disable decorators via config
2019-12-20 11:09:21 -05:00
Tyler Benson ad22bd9cfc
Merge pull request #1150 from DataDog/tyler/fix-disruptor-shutdown
Allow flush to return if executor already shut down
2019-12-19 16:12:02 -08:00
Laplie Anderson 712a5c1483 Disable decorators via config 2019-12-19 13:02:59 -05:00
Tyler Benson 32db01200c
Merge pull request #1131 from fujigon/feature/debugging
apply comma split logic to servlet request extract adapter
2019-12-19 09:06:12 -08:00
Tyler Benson fb8f7af342
Merge pull request #1149 from DataDog/tyler/jdk-muzzle
Add option for muzzle validation on the specific JDK version
2019-12-19 08:14:54 -08:00
kfujita b707a3aab9 move multi-value aware logic to Extractor. 2019-12-19 13:33:08 +09:00
kfujita 0f3125498c add test case 2019-12-19 13:33:03 +09:00
kfujita a5e693bb92 assert fix same as JettyServlet3Test 2019-12-19 13:32:09 +09:00
Laplie Anderson dc0cbeb95d apply comma split logic to servlet request extract adapter 2019-12-19 13:32:09 +09:00
Tyler Benson 619fdeda37
Merge pull request #1148 from DataDog/tyler/span-error
Capture error message even if no exception object provided.
2019-12-18 15:33:56 -08:00
Tyler Benson 25d0d98dff Allow flush to return if executor already shut down
Otherwise it could block shutdown if executor is stopped before disruptor.
2019-12-18 14:23:46 -08:00
Tyler Benson 31b77cbd7b Capture error message even if no exception object provided.
This is currently only used by the GoogleHttpClient instrumentation, but may be used by customers too.
2019-12-18 13:49:24 -08:00
Tyler Benson ded28674d3 Add option for muzzle validation on the specific JDK version
This is still useful to validate various aspects of the integrations even if it doesn't need to check against maven.
2019-12-18 13:40:19 -08:00
Tyler Benson b3f15ca133
Merge pull request #1146 from DataDog/tyler/boostrap-log-exception
Add better exception handling in Agent initialization
2019-12-17 22:03:42 -08:00
Tyler Benson 96edbe8b8a Add better exception handling in Agent initialization
An invalid statsd hostname causes an exception for jmxfetch.  This should be an error, but not prevent the app from starting.

Also improved log variable name consistency.
2019-12-17 14:15:42 -08:00
Tyler Benson fc59355a69
Merge pull request #1141 from DataDog/tyler/tag-query
Fix tagging query string for additional servers
2019-12-17 10:11:40 -08:00
Tyler Benson 99992df998 Fix tagging query string for additional servers
Add test to common test suite and adapt each test.
2019-12-17 09:33:27 -08:00
Tyler Benson f04bc03a90
Merge pull request #1142 from DataDog/tyler/pin-kafka-latest-version
Pin kafka latestDepTest version to 2.3.x
2019-12-16 09:17:10 -08:00
Tyler Benson a2b86e6b96 Pin kafka latestDepTest version to 2.3.x
2.4.0 introduces test failures:
```
Caused by: java.lang.NoClassDefFoundError: org.I0Itec.zkclient.ZkClient
```
when executing `compileLatestDepTestGroovy`.
2019-12-16 08:51:30 -08:00
Laplie Anderson aa838ceb28 Begin 0.40.0 2019-12-13 16:42:58 -05:00
Laplie Anderson aac1826ddb Version 0.39.0 2019-12-13 15:30:33 -05:00
Tyler Benson 839de614a5
Merge pull request #1136 from DataDog/tyler/tag-query
Capture full servlet URL in decorator
2019-12-12 15:16:38 -08:00
Laplie Anderson aaa6614116
Merge pull request #1138 from DataDog/landerson/play-2.8-muzzle
End Play 2.6 muzzle spec at 2.8 because its breaking
2019-12-12 18:11:01 -05:00
Laplie Anderson 86c3e80121 End Play 2.6 muzzle at 2.8 because its breaking 2019-12-12 17:47:21 -05:00
Tyler Benson b00cdee54a Capture full servlet URL in decorator
This is needed in order to tag the query string (when configured).

Full test suite will follow in future PR.
2019-12-12 13:47:40 -08:00
Douglas Q Hawkins 7b2c2e8c78
Merge pull request #1125 from DataDog/dougqh/service-decorator-ordering
Ordering inconistency with DDSpanBuilder.withTag
2019-12-12 10:33:07 -05:00
Douglas Q Hawkins e9e3b375b9
Merge pull request #1132 from DataDog/dougqh/bounded-sender-queue
Restricting sender queue size
2019-12-12 10:30:59 -05:00
dougqh ec27930d26 Ordering inconistency with DDSpanBuilder.withTag
Pior to this change, DDSpanBuilder.withTag behaves different than DDSpan.setTag when decorators are triggered.

Specifically builder.withTag(a, val).withTag(b, val) can behave differently than span.setTag(a, val); span.setTag(b, val)

This change makes a small step towards determinism by changing the HashMap inside DDSpanBuilder into a LinkedHashMap.  That guarantees the tags from withTags translated to the same sequence of setTag calls.

NOTE: Even with this change, there are inconsistencies when tags are removed or set to an empty value.
2019-12-11 20:11:58 -05:00
dougqh e604d9164c Adding monitor call back on interrupt
Adding call to monitor.onFailedSend in case senderSemaphore acquisition is interrupted during shutdown
2019-12-11 14:29:09 -05:00
Brian Devins-Suresh cf3f04f509
Merge pull request #1129 from DataDog/brian.devinssuresh/jedis-3.0
Add support for jedis 3.0+
2019-12-11 11:22:16 -05:00
Cecile terpin 05d4c156f3
Merge pull request #1135 from DataDog/cécile/ContainerInfoForDocker
AllowUstoGetContainerInfoOnDocker
2019-12-11 16:51:31 +01:00
Laplie Anderson 7b79a67cc0
Merge pull request #1134 from DataDog/landerson/jax-rs-filter
JAX-RS ContainerRequestContextFilter instrumentation
2019-12-11 10:39:39 -05:00
Cecile terpin 073e4bbed5
Empty proc file is not an error
Empty proc file is not an error
2019-12-11 16:35:42 +01:00
Cecile terpin ce0d09f04a
AllowUstoGetContainerInfoOnDocker
Tested on docker. Although "/proc/self/cgroup" file is not empty, "/proc/self/cgroup".toFile().length() returns 0
as does Files.size("/proc/self/cgroup").
2019-12-11 14:27:23 +01: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
dougqh c614df7382 Lowering expectedRejects to account for timing variance in test 2019-12-10 16:11:56 -05:00
dougqh aa54dab853 Switching forEach -> each to fix Java 7 2019-12-10 16:11:56 -05:00
dougqh 53eacfdc79 Improving test reliability
Improving the reliability of the slow sender test.

Still needs work, but to make this truly reliable, I'd need to add to the DDAgentWriter API.  I'll probably do that, but I'm trying to start with sticking to the existing API.
2019-12-10 16:11:56 -05:00
dougqh 7883366b83 Restricting sender queue size
To prevent unbounded memory consumption, restricting the size of the sender queue.  Also, lowering the size of the Disruptor queue.

Unfortunately, our choice of a ScheduledExecutorService makes this a bit difficult, since ScheduledExecutorService doesn't allow us to supply the queue.

A bigger change is in-order but for now, this change restricts the queue size by introducing a Semaphore around the ScheduledExecutorService.

In effort to making testing easier, I introduced Monitor.onFlush.  This is used in the new slow response test which attempts to simulate a situation where the sending queue would back up.
2019-12-10 16:11:56 -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