Commit Graph

397 Commits

Author SHA1 Message Date
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
Tyler Benson 461270f1c7 Fix test to match new constructors. 2020-02-19 15:47:48 -08:00
Anubhaw Arya fc6c327705 formatting 2020-02-18 17:40:06 -08:00
Anubhaw Arya 4ee4688253 java 8 2020-02-18 15:20:53 -08:00
Anubhaw Arya 3c6b840d69 Cache the result of toString in BigInteger 2020-02-18 15:04:50 -08:00
Tyler Benson 3fff9f1a7d
Move serviceNameMappings processing to DDSpanContext (#1217)
Move serviceNameMappings processing to DDSpanContext
2020-02-18 10:54:36 -08:00
Marius Constantin 9ef59098ff Generify the tracer span build methods 2020-02-13 10:21:08 +01:00
Tyler Benson 8cab52015e Move serviceNameMappings processing to DDSpanContext
This allows the service name to be updated immediately instead of when the span is finished.
2020-02-12 17:08:57 -08:00
Nikolay Martynov fd58187994 Support JFR profiling 2020-02-11 14:55:19 -05:00
Tyler Benson 486d98135e Code review changes 2020-02-10 11:37:36 -08:00
Tyler Benson 75c7769192 Reduce tracer thread count by combining scheduled executors into a single executor.
Pulls out utility classes for reuse by other projects.

This also meant the dependency had to be bundled with dd-trace-ot since it isn't published as a separate dependency.
2020-02-10 10:45:58 -08:00
Tyler Benson 66400c9b37 Fix NPE on serialization with no span type
Add tests.
2020-02-07 15:58:49 -08:00
Cécile Terpin 25ddcd434b Merge branch 'master' into cecile/setError 2020-02-06 17:03:33 +01:00
Cécile Terpin d095978223 Fix setError 2020-02-06 17:02:17 +01:00
Tyler Benson cab139e905 Upgrade OkHttp client to 3.12.8 2020-02-04 15:06:44 -08:00
Tyler Benson 697d4972a8 Remove Jackson from dd-trace-ot
Reduced the size of dd-java-agent jar by about 2 MB. Jackson is not removed completely though as it is still a dependency of jmxfetch.

Trace serialization is primarily done directly with msgpack.
Response deserialization and LoggingWriter serialization is done with mochi.

Msgpack Serialization buffer still not being reused though.
2020-01-31 15:59:43 -05:00
Tyler Benson 406b324a82
Split TraceConsumer into two different disruptors (#1161)
Split TraceConsumer into two different disruptors
2020-01-31 15:41:14 -05:00
Tyler Benson 5c6f74fd5e
Merge pull request #1177 from DataDog/tyler/scope-depth-limit
Add limit to trace scope depth
2020-01-22 12:13:23 -08:00
Tyler Benson 5cce4cb783 Replace DDAgentWriter.Spec with a proper Builder.
Also rename the builder class on DDTracer to default name generated by Lombok.
2020-01-17 11:10:11 -08:00
Tyler Benson a280ae6b7f Check for both regular and lowercase names with decorator enabled flags. 2020-01-17 11:05:44 -08:00
Laplie Anderson bed15079bc Rename Rule Based Sampling properties 2020-01-16 11:38:38 -05:00
Tyler Benson 3aea763769 Remove test race condition 2020-01-15 16:13:44 -08:00
Tyler Benson a4db31cf79 Apply `_sample_rate` metric to allow dd-agent to do proper scaling of metrics when traces are sampled. 2020-01-15 16:13:44 -08:00
Tyler Benson 5ff855737b Add documentation, remove volatile/public, improve test reliability. 2020-01-15 16:13:44 -08:00
Tyler Benson 451fba256a Split TraceConsumer into two different disruptors
First disruptor (TraceProcessingDisruptor) does processing, which is currently limited to serialization, but in the future can do other processing such as TraceInterceptor invocation.
Second disruptor (BatchWritingDisruptor) takes serialized traces and batches them into groups and flushes them periodically based on size and time.
2020-01-15 16:13:44 -08:00
Tyler Benson bcf81823b3 Add limit to trace scope depth
When limit is exceeded, a NoopScope is returned.
Allow custom ScopeManager to be provided, with the plan to remove `ScopeContext` customization in the future.
2020-01-15 11:51:06 -08:00
Tyler Benson 075ecb9f37 Lazy init Writer from config to avoid premature resource allocation. 2020-01-15 09:37:07 -08:00
Tyler Benson e31cbd6c89 Add Builder to DDTracer
Deprecate previous constructors.
2020-01-14 17:44:34 -08:00
Tyler Benson 0a89f2a57c Extract DDAgentResponseListener from DDApi.
Reduce references to DDApi
2019-12-20 14:49:31 -08:00