Commit Graph

425 Commits

Author SHA1 Message Date
Nikolay Martynov 5aeca66dcb
Merge pull request #1379 from DataDog/mar-kolya/upgrade-statsd
Use newer version of statsd client
2020-04-17 13:08:54 -04:00
Jaroslav Bachorik 185ad185de
PROF-1037: Capture thread CPU time elapsed in scope (#1358) 2020-04-17 18:14:54 +02:00
Nikolay Martynov 00ac902a8f Include specific unixsocket lib version into shared jar 2020-04-17 09:56:26 -04:00
Nikolay Martynov ad0960a922 Use newer version of statsd client 2020-04-17 09:36:22 -04:00
Nikolay Martynov 7c1f166048 Use newer version of jnr-unixsocket 2020-04-17 09:34:54 -04:00
Tyler Benson ebb9b5da65 Properly handle resource name for nested JAX-RS calls
Previously the last called one was winning.  Now we check if the resource name is already set before applying the new name.
2020-04-16 14:23:16 -04:00
Brian Devins-Suresh 8e111e49ad Revert feature to calculate sample rate based on failed reporting 2020-04-15 11:09:07 -04:00
Tyler Benson 07f99a98d8
Merge pull request #1221 from DataDog/tyler/trace-processor
Add TraceProcessor and move some existing functionality to rules
2020-04-14 13:33:46 -04:00
Tyler Benson 11c71e1d5d Avoid setting the error tag
and test fixes.
2020-04-14 12:21:51 -04:00
Tyler Benson 3aa803489b Fix tests. 2020-04-13 18:03:53 -04:00
Nikolay Martynov 96fcb278b6 Add comment 2020-04-13 17:41:25 -04:00
Tyler Benson d1dc756b12 Fix issues from code reviews. 2020-04-13 17:06:12 -04:00
Tyler Benson 60226086c3 Catch NumberFormatException 2020-04-13 17:06:12 -04:00
Nikolay Martynov 1fb844ab5f Make `CommonTaskExecutor` periodic tasks safe
* Verify that we can schedule task and catch exceptions.
This should help to avoid additional exceptions on app crash during
  startup.

* Avoid holding strong references from within executor to make sure
  that things can get GCed.
2020-04-13 16:04:31 -04:00
Tyler Benson df97f90fec Remove OperationDecorator 2020-04-13 15:55:37 -04:00
Tyler Benson 8170f7bc7b Various fixes 2020-04-13 15:55:37 -04:00
Tyler Benson 7614fa42e0 Move DBStatementAsResourceName to DBStatementRule 2020-04-13 15:54:52 -04:00
Tyler Benson 7650efe5ed Move AnalyticsSampleRateDecorator to AnalyticsSampleRateRule 2020-04-13 15:54:51 -04:00
Tyler Benson c288f69e64 Move ResourceNameDecorator to ResourceNameRule 2020-04-13 13:59:11 -04:00
Tyler Benson f0eb73ef12 Use tags instead of meta
which includes baggage.
2020-04-13 13:59:11 -04:00
Tyler Benson 329e79b801 Move SpanTypeDecorator to SpanTypeRule 2020-04-13 13:59:11 -04:00
Tyler Benson 2028b10009 Move ErrorFlag to TraceProcessor 2020-04-13 13:59:11 -04:00
Tyler Benson 97efa307d3 Stop setting error tag and update tests. 2020-04-13 13:59:11 -04:00
Tyler Benson 73fb7aa2b6 Add TraceProcessor and move some existing functionality to rules
Specifically, the Status5XXRule, URLAsResourceNameRule, and Status404Rule.
2020-04-13 13:59:11 -04:00
Tyler Benson b85e023fbe Revert "add ..."metrics":{"_dd.measured":1}... to every span (#1336)"
This reverts commit cda39adf50.
2020-04-10 13:56:03 -04:00
Lev Priima 7f146d74dc
DD_SERVICE; DD_ENV; DD_VERSION env vars support (#1341)
DD_SERVICE; DD_ENV; DD_VERSION env vars support

* Config.valueOf("", null, "") with throw NPE

* mark unused public fields @Deprecated in Config.java

* keep unused public fields untouched

* retrun 2arg Config ctor
2020-04-10 10:50:11 -07:00
Lev Priima cda39adf50
add ..."metrics":{"_dd.measured":1}... to every span (#1336)
* add ..."metrics":{"_dd.measured":1}... to every span

* update tests to always have "metrics":{"_dd.measured":1} in every span

Authored-by: Lev Priima <lev.priima@data.dog>
2020-03-25 11:17:47 -07:00
Laplie Anderson cef6da61dc
Revert "Add config to capture stacktrace when a span duration exceeds threshold" 2020-03-23 19:13:29 -04:00
Tyler Benson 2f64edaea4 Make threshold based on average duration
This should help avoid too frequent of stacktraces when the configured threshold is a normal duration.
Alternatively, we could make it a percentage above the average.
2020-03-10 15:08:12 -07:00
Tyler Benson 1cbb874c7c Replace FilteredStringWriter with direct StackTraceElement usage. 2020-03-10 13:18:22 -07:00
Tyler Benson 2b74487ed6 Add config to capture stacktrace when a span duration exceeds threshold
(But only when span is not errored or finished on a different thread.)

Use the following config:
```
-Ddd.trace.span.duration.stacktrace.millis=1000
```
(One second is the default, 0 disables.)
2020-03-10 13:18:22 -07:00
Tyler Benson ee5cf2cf24 Attempt to improve test reliability
Add timeouts (to avoid a gradle level timeout) and retries (since we're doing it manually anyway).

I realize this is a band aid...
2020-03-04 19:02:41 -08:00
Nikolay Martynov e42fc4a117
Merge pull request #1278 from DataDog/mar-kolya/upgrade-system-rules-everywhere
Use same version of system-rules everywhere
2020-03-02 17:23:19 +01:00
Nikolay Martynov 5e60d9b5cd Use same version of system-rules everywhere 2020-03-02 10:58:52 -05:00
Marius Constantin d36201c9dc Apply code review changes 2020-02-28 18:53:35 +01:00
Marius Constantin b24ae8d638 Add the DefaultLogHandler implementation 2020-02-28 18:53:35 +01:00
Marius Constantin 6cd2d9f79b Introduce the LogsHandler 2020-02-28 18:53:35 +01:00
Tyler Benson e4d29e37ef
Update JMH benchmarks (#1242)
Update JMH benchmarks
2020-02-21 09:38:34 -08:00
Nikolay Martynov e92d326052
Merge pull request #1236 from DataDog/mar-kolya/determine-agent-url-on-first-call
Determine agent URL version on first upload call
2020-02-21 07:04:49 -05:00
Tyler Benson e1964e526e Update JMH benchmarks
Benchmark is run with `./gradlew :dd-java-agent:benchmark:jmh` -- after updating the absolute paths to the various agents in `ClassRetransformingBenchmark`.  Unfortunately I was unable to have it launch correctly with a relative path.
2020-02-20 17:30:36 -08:00
Tyler Benson b805bf5994
Cache the result of toString in BigInteger (#1228)
Cache the result of toString in BigInteger
2020-02-20 16:10:31 -08:00
Anubhaw Arya 17b4fae39c Ignores for coverage 2020-02-20 12:00:28 -08:00
Nikolay Martynov 2c14aecd5a Create http client laizily 2020-02-20 10:11:25 -05:00
Nikolay Martynov a4071ca768 Fix some typos in tests 2020-02-20 10:07:53 -05:00
Nikolay Martynov cddd368fc0 Fix integration test 2020-02-20 09:26:33 -05:00
Nikolay Martynov c8bbce0549 Fix more tests 2020-02-20 08:48:48 -05:00
Nikolay Martynov 102c0feb5d Merge branch 'master' into mar-kolya/determine-agent-url-on-first-call 2020-02-20 08:33:55 -05:00
Nikolay Martynov f0a11d4aff Make sure traceUrl is null before detecting agent url 2020-02-20 08:18:54 -05:00
Nikolay Martynov e044567617 Fix test 2020-02-20 08:06:13 -05:00
Nikolay Martynov 8209a8830c Determine agent URL version on first upload call
This should remove http request from critical path during app load
2020-02-20 07:20:08 -05:00