Commit Graph

146 Commits

Author SHA1 Message Date
Tyler Benson a3875aff2c Logging improvements and other misc
from reviewing a customer’s logs.
2018-08-09 15:59:59 +10:00
Nikolay Martynov e517080234 Fix span cleaner executor to use correct span cleaner reference 2018-08-01 14:59:22 -04:00
Nikolay Martynov afc16a0dd5
Merge pull request #418 from DataDog/mar-kolya/ignore-empty-tags-in-config
Ignore empty entries in tags config strings
2018-07-30 23:24:19 -04:00
Tyler Benson 3856e7fd1a http clients 2018-07-31 12:53:50 +10:00
Tyler Benson 561eb0fcd9 Update span types to be consistent with other tracers 2018-07-31 12:40:03 +10:00
Nikolay Martynov db2f3c8e0a Ignore empty entries in tags config strings
Empty tags (or service names) do not make sense. Currently we ignore
whole config line which is too harsh. Instead just ignore a key with
empty value.
2018-07-30 22:32:04 -04:00
Tyler Benson 8dd87a8d30
Merge pull request #415 from DataDog/tyler/resolver-config
Allow DDTracerResolver to be disabled.
2018-07-31 12:24:50 +10:00
Tyler Benson 12e41be258
Merge pull request #416 from DataDog/tyler/contributing
Add contributing document and apply formatting.
2018-07-31 12:24:23 +10:00
Nikolay Martynov b58bf1a2bb
Merge pull request #419 from DataDog/mar-kolya/simplify-default-tags-handling
Simplify default tags handling
2018-07-30 22:19:20 -04:00
Tyler Benson ff9ef671f3 Apply formatter on groovy files. 2018-07-31 12:09:28 +10:00
Tyler Benson 51919a77bb Apply formatter on java files. 2018-07-31 12:07:43 +10:00
Tyler Benson b5c8a8b8fc Apply formatter on gradle files. 2018-07-31 12:04:00 +10:00
Nikolay Martynov 4139af73fa DDTracer: add some asserts into constructor 2018-07-30 21:28:22 -04:00
Nikolay Martynov 2c0702f278 Simplify default tags handling
Remove special case of tags beng empty - it is unlikely to improve
performance but it complicated code unnecessarily.
2018-07-30 21:14:52 -04:00
Tyler Benson f2dbeecdf5
Merge pull request #394 from DataDog/tyler/peer-service
Add support for OT’s `service` and `peer.service` tags
2018-07-31 10:26:22 +10:00
Tyler Benson 2dd62bbab1 Optimization to avoid serialization when logging disabled. 2018-07-31 10:17:05 +10:00
Gary Huang 4c88e1a0a8
Merge pull request #392 from DataDog/gary/uint64-id-support
Change the internal storage and handling of trace ID, span ID, and pa…
2018-07-30 15:01:10 -04:00
Tyler Benson d3e0323b04 Allow DDTracerResolver to be disabled. 2018-07-30 15:17:27 +10:00
Tyler Benson 4e60246e17
Merge pull request #405 from DataDog/tyler/servlet-async
Refactor servlet instrumentation and disable async on response.
2018-07-30 10:27:54 +10:00
Gary Huang 0d9a461b87 Add NumberFormatException as cause to IllegalArgumentException if extracted ID is not a number. Also change uint64 max BigInteger initialization to be more readable. 2018-07-26 11:26:56 -04:00
Gary Huang 6317b21d5c Fix merge conflicts with service mapping change 2018-07-26 09:16:41 -04:00
Tyler Benson 2651dec616 Add support for OT’s `service` and `peer.service` tags
Sets DD’s `service.name` on the span.
2018-07-26 16:29:04 +10:00
Tyler Benson 1e36343485 Null or empty tags should remove previously set values.
Add context to servlet2 test.

Clean up some declared tracers that mess up the classpath.
2018-07-26 12:20:37 +10:00
Nikolay Martynov baa54c3553 Disable coverage checks for LoggingWriter
The build fails from time to time complaining about this class not
being tested. Looks like randomness of thi is due to Gradle's caching.

Ideally we would like to have this class tested, but Lombok injecting
logger doesn't really provide much of a room to test there.
2018-07-25 12:13:29 -04:00
Tyler Benson 5fe08d20fc Only apply service name mapping on finish
If done in the decorator, it would be applied twice.  Only want it done once.
2018-07-25 14:58:55 +10:00
Gary Huang 93e70dcef6 Address comments and add test case for extracting non numeric IDs 2018-07-24 14:04:52 -04:00
Tyler Benson 7807615605 This actually must be done at the span finish, rather than creation.
Otherwise the context decorator doesn’t know if it should change the span name or not.
2018-07-23 13:59:01 +10:00
Tyler Benson de5d108afc Allow service name mapping to apply without setting the tag.
Previously the mapping only applied when the `service.name` tag was set, not on the default or configured service name.
2018-07-23 13:46:48 +10:00
Gary Huang 96f79a8aba Change the internal storage and handling of trace ID, span ID, and parent IDs' to use String instead of long primitive.
This will allow the java agent to receive unsigned 64 bit integers without overflow.

Also upgraded MsgPack to handle the serialization of such Strings as numbers in JSONs.
2018-07-20 17:19:04 -04:00
Tyler Benson 12a2fce96d Upgrade java formatter version. 2018-07-19 14:10:53 +10:00
Andrew Kent 4401779aad Fix priority sampling implementation bugs
- use correct sampling flag name
- set sampling rate
- set sampling flags on root span metrics only
- tests to assert correct behavior
2018-06-26 10:19:28 -07:00
Andrew Kent 224f65a0c2 rootSpan hack for PendingTrace 2018-06-26 10:19:28 -07:00
Nikolay Martynov 088402beed
Merge pull request #358 from DataDog/mar-kolya/fix-span-time-boundaries-poc
Fix span time boundaries
2018-06-26 12:48:49 -04:00
Tyler Benson 17c2f28947 Upgrade to gradle 4.8.1 2018-06-26 10:33:35 +10:00
Nikolay Martynov d50154f159 PendingTrace: add a TODO to move time fields into DDTracer 2018-06-25 09:28:01 -04:00
Nikolay Martynov 2bdf54bd6e Fix span start boundaries
Before: span start had millisecond precision because we just use
`currentTimeMillis` to get span start time.

This creates weirdly looking traces where spans 'fly' way out of
parent spans if they have sub-ms length.

After: we establish 'trace start time' with millisecond precision and
measure all span start and stop times from that. This means all
relative times are maintained with nanosecond precision (or whateve OS
clock fives us).

This is POC and some things are not yet fixed. E.g. JMS1
instrumentation injects time into span manually - and it is not
apparent how to pake it do so relative to trace clock.

Note: going forward this should allow us to completely get rid of
'double time keeping' we currently have in `DDSpan`.
2018-06-22 17:17:53 -04:00
Nikolay Martynov 9cc99bafbf Simplify Jacoco configuration 2018-06-20 17:13:30 -04:00
Nikolay Martynov e070a9be4a Fix jacoco excluded classes concatenation 2018-06-20 17:05:16 -04:00
Nikolay Martynov d3aa982082 Add tests for OTTraceCorrelation 2018-06-18 17:57:02 -04:00
Andrew Kent 519f15bcc6
Merge pull request #357 from DataDog/ark/servlet-async
Close scope for async servlet requests
2018-06-17 23:44:24 -07:00
Nikolay Martynov f9cc33c7c8
Merge pull request #353 from DataDog/mar-kolya/spymemcached-instrumentation
Mar kolya/spymemcached instrumentation
2018-06-15 12:44:42 -04:00
Andrew Kent 6cd8be67d5 Close scope for async servlet requests 2018-06-14 20:23:54 -07:00
Andrew Kent f28445c45f CorrelationIdentifier for MDC frameworks. 2018-06-14 15:33:15 -07:00
Nikolay Martynov 1e4c88ffcb Merge branch 'master' into mar-kolya/spymemcached-instrumentation 2018-06-14 15:38:01 -04:00
Nikolay Martynov ba37ccc552 Spymemcached: use cache span type 2018-06-14 13:37:35 -04:00
Tyler Benson ff56389a56 Upgrade some versions. 2018-06-14 11:56:56 +10:00
Gary Huang e89cbd0bb1 set span cleaner threads to be daemon threads so that applications can exit without explicit exit statement. 2018-06-07 17:09:59 -04:00
Tyler Benson d235618a6e Add instrumentation for Java’s UrlConnection
For HttpUrlConnection, trace propagation headers are added to the outgoing request.

Due to the awkward design of the API, the ability to instrument in a natural way was limited, thus the main points instrumented are the get{Input,Output}Stream methods.
2018-06-06 09:12:48 +10:00
Tyler Benson de74eb1938 Add additional metadata to ES client calls. 2018-05-25 13:58:44 +10:00
Tyler Benson 0cf8fef8d8 Elasticsearch Instrumentation 2018-05-23 11:29:13 +10:00