Commit Graph

2225 Commits

Author SHA1 Message Date
Nikolay Martynov bae2d7dde8 Allow non-wrapped tasks in disabled executors
Some executors cannot handle tasks that have been wrapped into
`{Runnable,Callable}Wrapper` because they require certain subclass of
`{Callable,Runnable}` in order to work. We have a test that
effectively disables instrumentation for such executors.

This change makes sure that tasks that do not need to be
wrapped (which essentially means anything that is not lambda) still
get traced in such executors. One notable example of affected executor
type is `ScheduledThreadPoolExecutor`.
2019-02-11 11:47:34 -05:00
Nikolay Martynov b672a0fffc Fix ContinuableScope bug when parent span was not closed after scope was closed 2019-02-08 20:13:32 -05:00
Nikolay Martynov 3a0a471dd5 Close future's continuation on cancel even if future itself was not cancelled 2019-02-08 20:13:32 -05:00
Nikolay Martynov 9d830a3dab Do not close parent scope when closing continuation in concurrent execution state 2019-02-08 20:13:32 -05:00
Tyler Benson 11b09ba8ce
Merge pull request #702 from DataDog/tyler/partial-flush-name
Make internal name usage consistent with setting name.
2019-02-08 11:15:07 -08:00
Tyler Benson 2283040a5b Make internal name usage consistent with setting name. 2019-02-08 10:26:40 -08:00
Tyler Benson 625b1334f5
Merge pull request #699 from DataDog/tyler/api-timestamp
New API:  Allow creating timestamp with custom time.
2019-02-08 08:17:00 -08:00
Tyler Benson bc2041b5b6 New API: Allow creating timestamp with custom time. 2019-02-07 15:48:31 -08:00
Tyler Benson 0802bb864c
Merge pull request #696 from DataDog/tyler/jmxfetch-config
JMXFetch bundled integrations disabled by default
2019-02-07 09:48:32 -08:00
Nikolay Martynov 931e6ff8af
Merge pull request #688 from DataDog/mar-kolya/webflux-fixes
Fix webflux integration to not rely in active span
2019-02-07 12:45:50 -05:00
Tyler Benson 4414dc2ad5 JMXFetch bundled integrations disabled by default
Enable each individually by setting `-Ddd.integration.<integration_name>.enabled=true`.
2019-02-06 13:00:52 -08:00
Tyler Benson 2643471f75
Merge pull request #695 from DataDog/tyler/remove-codec
Remove codec registry for inject/extract
2019-02-06 09:37:22 -08:00
Tyler Benson 996c1ce625 invert instanceof check 2019-02-06 08:35:10 -08:00
Tyler Benson 326577d7df Remove codec for inject/extract
In preparation for OT 0.32 support.
2019-02-05 15:07:33 -08:00
Tyler Benson 7a430647a0
Merge pull request #691 from DataDog/tyler/split-service-http-client
Add setting to set service name by domain for http clients
2019-02-05 13:17:46 -08:00
Nikolay Martynov 6de4f1b0ba
Merge pull request #694 from DataDog/mar-kolya/split-service-http-client-suggestions
Mar kolya/split service http client suggestions
2019-02-05 16:07:54 -05:00
Nikolay Martynov a46d6a2e8f Use config inheritance in `withConfigOverride`.
This moves us forward to abstract 'Config' and away from depending in
specific config data source (e.g. system properties).
2019-02-05 15:51:05 -05:00
Nikolay Martynov 4af241fc48 Fix config to inherit `HTTP_CLIENT_HOST_SPLIT_BY_DOMAIN` 2019-02-05 15:22:14 -05:00
Tyler Benson 65cece6741 Fix code coverage ignores. 2019-02-05 12:15:14 -08:00
Tyler Benson 12e7efc0b9 Review fixes 2019-02-05 11:58:36 -08:00
Tyler Benson bbcd2f6949 Move other Utils to utils package 2019-02-05 11:43:05 -08:00
Tyler Benson 878bab38be Add comments to Config 2019-02-05 11:31:41 -08:00
Tyler Benson 6aa371d790 Encapsulate config override reflection 2019-02-05 11:30:07 -08:00
Tyler Benson 707ad33028
Merge pull request #682 from DataDog/tyler/decorators
Abstract decorator classes for new API
2019-02-05 09:28:58 -08:00
Tyler Benson 6cebabbada Move integrations config to Config class. 2019-02-05 08:20:49 -08:00
Tyler Benson 1a54e8179a Add setting to set service name by domain for http clients
This will allow better metric collection and identification of trends for individual services/hosts.

This is not enabled by default because it can result in a high cardinality of services.
2019-02-05 08:20:49 -08:00
Nikolay Martynov a086f38f2f Fix webflux integration to not rely in active span
Netty event loop instrumentation doesn't allow us to attribute work to
correct span so we have to maintain that manually.
2019-02-05 10:38:21 -05:00
Nikolay Martynov f84e510f3e Increase timeouts in JMS test to try to make it more stable 2019-02-05 10:10:49 -05:00
Nikolay Martynov 16fe4bd370 Add some debug logging to ContinuableScope 2019-02-05 10:10:49 -05:00
Nikolay Martynov c4f4560750
Merge pull request #690 from DataDog/mar-kolya/collect-java-crash-reports
Collect JVM crashes in circleci artifacts
2019-02-05 09:41:41 -05:00
Nikolay Martynov 6beade83ed Disable Java7 JIT for for some code
Disable JIT in Java7 for 1 Bytebuddy method. Hopefully this will help
with this error:

```
Stack: [0x00007f892f079000,0x00007f892f17a000],  sp=0x00007f892f174e30,  free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x73db30]  PhaseIdealLoop::build_loop_late_post(Node*)+0x130
V  [libjvm.so+0x73e06b]  PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0x10b
V  [libjvm.so+0x745239]  PhaseIdealLoop::build_and_optimize(bool, bool)+0x899
V  [libjvm.so+0x4589b0]  Compile::Optimize()+0x8f0
V  [libjvm.so+0x459e87]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool)+0x10c7
V  [libjvm.so+0x3c9c5c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int)+0xec
V  [libjvm.so+0x45f5bb]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x32b
V  [libjvm.so+0x460960]  CompileBroker::compiler_thread_loop()+0x440
V  [libjvm.so+0x9283ab]  JavaThread::thread_main_inner()+0xdb
V  [libjvm.so+0x928590]  JavaThread::run()+0x1d0
V  [libjvm.so+0x7f56e2]  java_start(Thread*)+0x122

Current CompileTask:
C2:   3653  733
net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor::onParameterizedType (129
bytes)
```
2019-02-05 09:40:43 -05:00
Nikolay Martynov f3d3d1269a
Merge pull request #692 from DataDog/mar-kolya/netty-4.0-improve-test
Make test results in netty-4.0 client tests more readable
2019-02-05 09:35:55 -05:00
Tyler Benson 5b082a797b
Merge pull request #689 from outpace/skip-clojure-dynamicclassloader
Don't break Clojure's protocols
2019-02-04 15:06:47 -08:00
Nikolay Martynov b25784e7a2 Make test results in netty-4.0 client tests more readable 2019-02-04 15:39:42 -05:00
Nikolay Martynov 6a950d4745 Collect JVM crashes in circleci artifacts
So we could investigate them later.
2019-02-04 14:35:59 -05:00
Daniel Solano Gómez 4953a6c417 Skip clojure.lang.DynamicClassLoader
Not doing this seems to cause issues with Clojure protocols.
An application instrumented with the dd-java-agent that will
otherwise run fine will fail with ClassNotFoundException for
classes pertaining to Clojure protocols.
2019-02-04 07:12:29 -06:00
Tyler Benson 9353f82063
Merge pull request #686 from DataDog/tyler/jboss-jmxfetch
Initialize JMXFetch if configured log manager is on sys classpath
2019-01-31 15:24:55 -08:00
Tyler Benson 88d190d95b Test for customlogmanager=false 2019-01-31 14:53:58 -08:00
Will Gittoes 558cd9a3b7
Merge pull request #683 from DataDog/willgittoes-dd/hystrix-operation-name
Hard-code Hystrix operation (span) name, leaving the resource name dynamic
2019-02-01 09:44:29 +11:00
Will Gittoes 99e4e52600
Fix style 2019-02-01 09:29:05 +11:00
Tyler Benson e293ed477d Fix tests. 2019-01-31 14:25:19 -08:00
Tyler Benson f7abb2ac04 Initialize JMXFetch if configured log manager is on sys classpath
Some applications set java.util.logging.manager but never actually initialize the logger.
Check to see if the configured manager is on the system classpath.
If so, it should be safe to initialize jmxfetch which will setup the log manager.
2019-01-31 13:31:48 -08:00
Tyler Benson b58ec1b4fe
Merge pull request #684 from DataDog/tyler/jboss-jmxfetch
Replace jboss classpath check with ENV check for jmxfetch delay
2019-01-31 11:42:38 -08:00
Tyler Benson c89b00f682 Elaborate on comment. 2019-01-31 11:14:06 -08:00
Tyler Benson ea0dedcee7 Allow setting dd.app.customlogmanager=false to disable jboss check 2019-01-31 10:53:20 -08:00
Tyler Benson ee8a26d4dc Replace jboss classpath check with ENV check for jmxfetch delay
Some applications seem to have this jboss class on the classpath, but don’t actually use it.  When coupled with not actually using JUL, this means that we may never actually start JMXFetch.

Checking for JBOSS_HOME instead should be safer.
2019-01-31 10:42:43 -08:00
Tyler Benson f571f8499f Abstract decorator classes for new API
Intended to be implemented for each instrumentation, then called directly by the instrumentation in the appropriate locations.
2019-01-31 09:04:44 -08:00
Will Gittoes a44b59bb14
Hard-code Hystrix operation (span) name, leaving the resource name dynamic 2019-01-31 14:30:08 +11:00
Will Gittoes f6d3b6b70b
Ensure jenv java-version doesnt get committed 2019-01-31 13:51:39 +11:00
Will Gittoes 5941a93ad4
Merge pull request #679 from DataDog/willgittoes-dd/es-rest-6.4
Add support for Elasticsearch rest client 6.3 and above
2019-01-31 11:02:59 +11:00