Enable tracing in simulation
This will help test the flow of span IDs from the client all the way to the storage servers.
This commit is contained in:
parent
f7d1310d0d
commit
7d73d52a91
|
@ -1577,6 +1577,12 @@ DatabaseContext::DatabaseContext(Reference<AsyncVar<Reference<IClusterConnection
|
||||||
smoothMidShardSize.reset(CLIENT_KNOBS->INIT_MID_SHARD_BYTES);
|
smoothMidShardSize.reset(CLIENT_KNOBS->INIT_MID_SHARD_BYTES);
|
||||||
globalConfig = std::make_unique<GlobalConfig>(this);
|
globalConfig = std::make_unique<GlobalConfig>(this);
|
||||||
|
|
||||||
|
if (g_network->isSimulated()) {
|
||||||
|
// Randomly trace transactions in simulation to enable testing of span
|
||||||
|
// ID propagation to the storage servers.
|
||||||
|
transactionTracingSample = deterministicRandom()->random01() < 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
if (apiVersion.version() >= 700) {
|
if (apiVersion.version() >= 700) {
|
||||||
registerSpecialKeysImpl(SpecialKeySpace::MODULE::ERRORMSG,
|
registerSpecialKeysImpl(SpecialKeySpace::MODULE::ERRORMSG,
|
||||||
SpecialKeySpace::IMPLTYPE::READONLY,
|
SpecialKeySpace::IMPLTYPE::READONLY,
|
||||||
|
|
|
@ -86,8 +86,8 @@ void FlowKnobs::initialize(Randomize randomize, IsSimulated isSimulated) {
|
||||||
|
|
||||||
init( WRITE_TRACING_ENABLED, true ); if( randomize && BUGGIFY ) WRITE_TRACING_ENABLED = false;
|
init( WRITE_TRACING_ENABLED, true ); if( randomize && BUGGIFY ) WRITE_TRACING_ENABLED = false;
|
||||||
init( TRACING_SPAN_ATTRIBUTES_ENABLED, false ); // Additional K/V and tenant data added to Span Attributes
|
init( TRACING_SPAN_ATTRIBUTES_ENABLED, false ); // Additional K/V and tenant data added to Span Attributes
|
||||||
init( TRACING_SAMPLE_RATE, 0.0); // Fraction of distributed traces (not spans) to sample (0 means ignore all traces)
|
init( TRACING_SAMPLE_RATE, 0.0 ); if (randomize && BUGGIFY) TRACING_SAMPLE_RATE = 0.01; // Fraction of distributed traces (not spans) to sample (0 means ignore all traces)
|
||||||
init( TRACING_UDP_LISTENER_ADDR, "127.0.0.1"); // Only applicable if TracerType is set to a network option
|
init( TRACING_UDP_LISTENER_ADDR, "127.0.0.1" ); // Only applicable if TracerType is set to a network option
|
||||||
init( TRACING_UDP_LISTENER_PORT, 8889 ); // Only applicable if TracerType is set to a network option
|
init( TRACING_UDP_LISTENER_PORT, 8889 ); // Only applicable if TracerType is set to a network option
|
||||||
|
|
||||||
//connectionMonitor
|
//connectionMonitor
|
||||||
|
|
Loading…
Reference in New Issue