Commit Graph

3553 Commits

Author SHA1 Message Date
Tyler Benson 92069fd498 Merge changes from dd-trace-java 0.39.0
https://github.com/DataDog/dd-trace-java/releases/tag/v0.39.0

# Conflicts:
#	dd-java-agent/instrumentation/akka-http-10.0/src/lagomTest/groovy/LagomTest.groovy
#	dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpClientInstrumentationTest.groovy
#	dd-java-agent/instrumentation/akka-http-10.0/src/test/groovy/AkkaHttpServerInstrumentationTest.groovy
#	dd-java-agent/instrumentation/datastax-cassandra-3/src/test/groovy/CassandraClientTest.groovy
#	dd-java-agent/instrumentation/dropwizard/dropwizard-views/src/test/groovy/ViewRenderTest.groovy
#	dd-java-agent/instrumentation/dropwizard/src/test/groovy/DropwizardTest.groovy
#	dd-java-agent/instrumentation/elasticsearch/transport-5.3/src/test/groovy/springdata/Elasticsearch53SpringRepositoryTest.groovy
#	dd-java-agent/instrumentation/glassfish/src/test/groovy/GlassFishServerTest.groovy
#	dd-java-agent/instrumentation/google-http-client/src/test/groovy/AbstractGoogleHttpClientTest.groovy
#	dd-java-agent/instrumentation/grpc-1.5/src/test/groovy/GrpcStreamingTest.groovy
#	dd-java-agent/instrumentation/grpc-1.5/src/test/groovy/GrpcTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/CriteriaTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/QueryTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-3.3/src/test/groovy/SessionTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/CriteriaTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/QueryTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-4.0/src/test/groovy/SessionTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/ProcedureCallTest.groovy
#	dd-java-agent/instrumentation/hibernate/core-4.3/src/test/groovy/SpringJpaTest.groovy
#	dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixObservableChainTest.groovy
#	dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixObservableTest.groovy
#	dd-java-agent/instrumentation/hystrix-1.4/src/test/groovy/HystrixTest.groovy
#	dd-java-agent/instrumentation/java-concurrent/src/slickTest/groovy/SlickTest.groovy
#	dd-java-agent/instrumentation/jax-rs-annotations-1/src/test/groovy/JerseyTest.groovy
#	dd-java-agent/instrumentation/jdbc/src/test/groovy/JDBCInstrumentationTest.groovy
#	dd-java-agent/instrumentation/jedis-1.4/src/test/groovy/JedisClientTest.groovy
#	dd-java-agent/instrumentation/jetty-8/src/test/groovy/JettyHandlerTest.groovy
#	dd-java-agent/instrumentation/jms/src/latestDepTest/groovy/JMS2Test.groovy
#	dd-java-agent/instrumentation/jms/src/test/groovy/JMS1Test.groovy
#	dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationBasicTests.groovy
#	dd-java-agent/instrumentation/jsp-2.3/src/test/groovy/JSPInstrumentationForwardTests.groovy
#	dd-java-agent/instrumentation/kafka-clients-0.11/src/test/groovy/KafkaClientTest.groovy
#	dd-java-agent/instrumentation/kafka-streams-0.11/src/test/groovy/KafkaStreamsTest.groovy
#	dd-java-agent/instrumentation/lettuce-5/src/test/groovy/LettuceAsyncClientTest.groovy
#	dd-java-agent/instrumentation/lettuce-5/src/test/groovy/LettuceReactiveClientTest.groovy
#	dd-java-agent/instrumentation/lettuce-5/src/test/groovy/LettuceSyncClientTest.groovy
#	dd-java-agent/instrumentation/netty-4.1/src/test/groovy/Netty41ClientTest.groovy
#	dd-java-agent/instrumentation/play-2.4/src/test/groovy/server/PlayServerTest.groovy
#	dd-java-agent/instrumentation/play-2.6/src/test/groovy/server/PlayServerTest.groovy
#	dd-java-agent/instrumentation/rabbitmq-amqp-2.7/src/test/groovy/RabbitMQTest.groovy
#	dd-java-agent/instrumentation/ratpack-1.4/src/test/groovy/server/RatpackHttpServerTest.groovy
#	dd-java-agent/instrumentation/servlet/request-2/src/test/groovy/JettyServlet2Test.groovy
#	dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/AbstractServlet3Test.groovy
#	dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/JettyServlet3Test.groovy
#	dd-java-agent/instrumentation/servlet/request-3/src/test/groovy/TomcatServlet3Test.groovy
#	dd-java-agent/instrumentation/sparkjava-2.3/src/test/groovy/SparkJavaBasedTest.groovy
#	dd-java-agent/instrumentation/spring-data-1.8/src/test/groovy/SpringJpaTest.groovy
#	dd-java-agent/instrumentation/spring-webflux-5/src/test/groovy/SpringWebfluxTest.groovy
#	dd-java-agent/instrumentation/spring-webflux-5/src/test/groovy/dd/trace/instrumentation/springwebflux/client/SpringWebfluxHttpClientTest.groovy
#	dd-java-agent/instrumentation/spring-webmvc-3.1/src/test/groovy/test/SpringBootBasedTest.groovy
#	dd-java-agent/instrumentation/spymemcached-2.12/src/test/groovy/datadog/trace/instrumentation/spymemcached/SpymemcachedTest.groovy
#	dd-java-agent/instrumentation/trace-annotation/src/test/groovy/ConfiguredTraceAnnotationsTest.groovy
#	dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceAnnotationsTest.groovy
#	dd-java-agent/instrumentation/trace-annotation/src/test/groovy/TraceConfigTest.groovy
#	dd-java-agent/instrumentation/twilio/src/test/groovy/test/TwilioClientTest.groovy
#	dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpClientTest.groovy
#	dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovy
#	dd-java-agent/testing/src/main/groovy/datadog/trace/agent/test/utils/TraceUtils.groovy
#	dd-trace-ot/src/main/java/datadog/opentracing/ContainerInfo.java
#	dd-trace-ot/src/main/java/datadog/opentracing/DDTracer.java
#	dd-trace-ot/src/main/java/datadog/trace/common/writer/DDAgentWriter.java
#	dd-trace-ot/src/test/groovy/datadog/opentracing/decorators/SpanDecoratorTest.groovy
#	dd-trace-ot/src/test/groovy/datadog/trace/api/writer/DDAgentWriterTest.groovy
2019-12-16 09:22:10 -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
Trask Stalnaker e2f9bfb4c5
Remove span type decorators (#38) 2019-12-12 16:20:27 -08: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
Trask Stalnaker ab3aa3ba3a
Remove error flag decorator (#37) 2019-12-11 16:56:21 -08: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
Laplie Anderson 498d2bd461 Add ContextRequestFilter instrumentation to JAX-RS 2019-12-10 14:00:31 -05:00
Tyler Benson 307e56714e
Merge pull request #1133 from DataDog/tyler/move-dropwizard-tests
Move dropwizard tests to dropwizard project
2019-12-10 10:51:42 -08: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 7717dbf5d8
Merge pull request #1115 from trask/fix-sporadic-test-failure
Fix sporadic test failure in Elasticsearch53SpringRepositoryTest
2019-12-10 12:58:25 -05:00
Trask Stalnaker 38a916f5e9
Remove operation name decorators (#36) 2019-12-09 10:40:13 -08:00
Laplie Anderson 6999f5125b
Merge pull request #1130 from DataDog/landerson/jax-rs-muzzle
Fix muzzle issue with Jax-rs async instrumentation
2019-12-06 20:57:49 -05:00
Laplie Anderson fa14af40c3 Fix muzzle issue with async instrumentation 2019-12-06 18:18:34 -05:00
Brian Devins-Suresh c7329e4b6b Work around muzzle feature missing 2019-12-06 14:12:46 -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
Brian Devins-Suresh c72f2d3b45 Fix muzzle test for 3.0 2019-12-06 13:45:05 -05:00
Brian Devins-Suresh 73eb217721 Make matchers more strict 2019-12-05 17:02:39 -05:00
Brian Devins-Suresh 2e5aff391d Use random ports for embedded redis 2019-12-05 16:23:22 -05:00
Brian Devins-Suresh 00fb29f528 Some clean up 2019-12-05 15:59:12 -05:00
Brian Devins-Suresh 7b92c40cbc Add support for jedis 3.0+ 2019-12-05 15:09:58 -05:00
Laplie Anderson f77cce0b79
Merge pull request #1126 from DataDog/landerson/helper-injector-optimization
HelperInjector optimization
2019-12-05 10:35:43 -05:00
Trask Stalnaker 7f2b478efc
Remove resource name decorators (#34) 2019-12-04 13:04:50 -08:00
Trask Stalnaker ef61b8047f
Update Seva's github username (#35) 2019-12-04 13:04:17 -08:00
Laplie Anderson 42ac5fc024 Remove synchronization and static helper map 2019-12-04 15:43:28 -05:00
Laplie Anderson d74cf29331
Merge pull request #1122 from sullis/bytebuddy-1.10.4
bytebuddy 1.10.4
2019-12-03 16:03:57 -05:00
Laplie Anderson 399c09771b
Merge pull request #1118 from trask/fix-circleci-muzzle-oom
Fix CircleCI muzzle build running out of memory
2019-12-03 16:03:28 -05:00
Trask Stalnaker b2c21072cf
Remove service name decorators (#33) 2019-12-03 10:49:15 -08:00
Trask Stalnaker a4089ff1fa
Remove globally applied tags (#32) 2019-12-02 19:12:44 -08:00
Trask Stalnaker 0514c6655d
Normalize tag verification (#30)
* Normalize tag verification order

* Add missing tag verification
2019-12-02 18:44:43 -08:00