Commit Graph

22 Commits

Author SHA1 Message Date
Tyler Benson a4d53b0dcd Update Cassandra Tests and more instance name cleanup 2019-06-13 15:55:40 -07:00
Tyler Benson 50279d64fe Span type should only be an attribute and not inherited
Previously we were inheriting from the parent and also often setting as a tag.

Apply default span assertion to verify the spanType is being checked properly. (Include error state too.)
2019-02-28 12:39:51 -08:00
Tyler Benson d842612697 Migrate Jedis/Lettuce instrumentation to Decorator 2019-02-27 09:04:52 -08:00
Tyler Benson bbcd2f6949 Move other Utils to utils package 2019-02-05 11:43:05 -08:00
Tyler Benson 432ce89a07 Add assertTraces to AgentTestRunner with implied argument
This will also help with auto complete when writing tests.
2018-10-15 10:19:00 +10:00
Tyler Benson 3f2ec7dc48 Move to separate packages 2018-08-16 12:24:27 +10:00
Tyler Benson 2e7899b405 redis 2018-07-31 12:40:47 +10:00
Tyler Benson ff9ef671f3 Apply formatter on groovy files. 2018-07-31 12:09:28 +10:00
Nikolay Martynov f1466304e8 Move random port generation to actual usage in tests using listening ports 2018-07-20 11:57:37 -04:00
Andrew Kent 46428dc6a3 Enable Lettuce instrumentation by default 2018-07-18 18:45:46 -07:00
Nikolay Martynov 1fbb33d182 More fixes to Lettuce tests
Lettuce intrumentatio is implemented in a way that after operation has
been performed `span` is not closed syncronously - in fact this happens
on separate thread. This means `spans` for even syncronous operations
may be closed on opposite order.
This means that writing tests that pefrom two operations and expect
two traces is slightly more complicated. In many places we can just
avoid doing that by preparing necessary data in `setup`.

This fixes some of the false negatives in tests.
2018-06-22 16:44:58 -04:00
Nikolay Martynov 389f65687a Fix some flakiness in Lettuce tests
It looks like automatic reconnection was enabled which lead to random
traces popping up in random places when Redis server was shutdown.

Also make sure that server persists only during single test to weedout
all inter-test dependencies.
2018-06-21 17:44:19 -04:00
Nikolay Martynov 21d58768cb Lettuce: properly close connection instead of letting it being GCed 2018-06-19 22:41:58 -04:00
Nikolay Martynov b0c2ab9b68 Lettuce: wait for trace after setup code
Otherwise that trace may land at some random point in time after and
cause flaky tests.
2018-06-19 15:15:29 -04:00
Gary Huang 429ee40f81 add workaround to avoid certain commands from crashing the trace agent. 2018-06-08 23:53:13 -04:00
Gary Huang 42b586badf remove recording of redis command arguments for now to avoid leaking sensitive data 2018-06-08 23:53:13 -04:00
Gary Huang 0bc9d9c08d remove string constants in advice class and comment fixes 2018-06-08 23:53:13 -04:00
Gary Huang b694ecdf79 add version scan and rename instrumentation classes 2018-06-08 23:53:13 -04:00
Gary Huang 3d61d839c8 make commands with no return values (void or Mono<Void>) to finish spans early in order to record command ran.
added support for cancellation of commands in async and reactive APIs.
since flux is a stream of events, when the stream is complete, the number of events emitted are recorded in the tag db.command.results.count
created helper class LettuceInstrumentationUtil
2018-06-08 23:53:13 -04:00
Gary Huang 989a259ec2 Fix code with suggestions from Tyler regarding previous commit.
no longer includes the command argument if the redis command being called is AUTH since it contains sensitive information.
2018-06-08 23:53:13 -04:00
Gary Huang ae1d9d7c52 complete async unit test and changes to implementation
using handleAsync with BiFunction because lettuce futures almost never throw exceptions on futures

improvement changes to come
2018-06-08 23:53:13 -04:00
Gary Huang 1213311418 lettuce redis client sync and async api instrumentation with sync unit tests complete 2018-06-08 23:53:13 -04:00