1818
1919import com .expedia .www .haystack .client .dispatchers .Dispatcher ;
2020import com .expedia .www .haystack .client .dispatchers .NoopDispatcher ;
21+ import com .expedia .www .haystack .client .idgenerators .RandomUUIDGenerator ;
2122import com .expedia .www .haystack .client .metrics .NoopMetricsRegistry ;
2223import com .expedia .www .haystack .client .propagation .MapBackedTextMap ;
2324import io .opentracing .References ;
@@ -67,7 +68,7 @@ public void testChildOfWithDualSpanType() {
6768 //create a client span
6869 final Tracer clientTracer = new Tracer .Builder (new NoopMetricsRegistry (),
6970 "ClientService" ,
70- dispatcher ).withDualSpanMode ().withIdGenerator (new UUIDv4Generator ()).build ();
71+ dispatcher ).withDualSpanMode ().withIdGenerator (new RandomUUIDGenerator ()).build ();
7172 final Span clientSpan = clientTracer .buildSpan ("Api_call" )
7273 .withTag (Tags .SPAN_KIND .getKey (), Tags .SPAN_KIND_CLIENT )
7374 .start ();
@@ -77,7 +78,7 @@ public void testChildOfWithDualSpanType() {
7778 //create a server
7879 final Tracer serverTracer = new Tracer .Builder (new NoopMetricsRegistry (),
7980 "ServerService" ,
80- dispatcher ).withDualSpanMode ().withIdGenerator (new UUIDv4Generator ()).build ();
81+ dispatcher ).withDualSpanMode ().withIdGenerator (new RandomUUIDGenerator ()).build ();
8182 final SpanContext wireContext = serverTracer .extract (Format .Builtin .TEXT_MAP , wireData );
8283 final Span serverSpan = serverTracer .buildSpan ("Api" )
8384 .asChildOf (wireContext )
@@ -97,7 +98,7 @@ public void testChildOfWithSingleSpanType() {
9798 //create a client span
9899 final Tracer clientTracer = new Tracer .Builder (new NoopMetricsRegistry (),
99100 "ClientService" ,
100- dispatcher ).withIdGenerator (new UUIDv4Generator ()).build ();
101+ dispatcher ).withIdGenerator (new RandomUUIDGenerator ()).build ();
101102 final Span clientSpan = clientTracer .buildSpan ("Api_call" )
102103 .withTag (Tags .SPAN_KIND .getKey (), Tags .SPAN_KIND_CLIENT )
103104 .start ();
@@ -107,7 +108,7 @@ public void testChildOfWithSingleSpanType() {
107108 //create a server
108109 final Tracer serverTracer = new Tracer .Builder (new NoopMetricsRegistry (),
109110 "ServerService" ,
110- dispatcher ).withIdGenerator (new UUIDv4Generator ()).build ();
111+ dispatcher ).withIdGenerator (new RandomUUIDGenerator ()).build ();
111112 final SpanContext wireContext = serverTracer .extract (Format .Builtin .TEXT_MAP , wireData );
112113 final Span serverSpan = serverTracer .buildSpan ("Api" )
113114 .asChildOf (wireContext )
@@ -128,7 +129,7 @@ public void testChildOfWithSingleSpanTypeAndExtractedContext() {
128129 //create a client span
129130 final Tracer clientTracer = new Tracer .Builder (new NoopMetricsRegistry (),
130131 "ClientService" ,
131- dispatcher ).withIdGenerator (new UUIDv4Generator ()).build ();
132+ dispatcher ).withIdGenerator (new RandomUUIDGenerator ()).build ();
132133
133134 final Span clientSpan = clientTracer .buildSpan ("Api_call" )
134135 .withTag (Tags .SPAN_KIND .getKey (), Tags .SPAN_KIND_CLIENT )
@@ -158,7 +159,7 @@ public void testChildOfSingleSpanTypeWithExtractedContextDoesNotPropagateExtract
158159 //create a client span
159160 final Tracer clientTracer = new Tracer .Builder (new NoopMetricsRegistry (),
160161 "ClientService" ,
161- dispatcher ).withIdGenerator (new UUIDv4Generator ()).build ();
162+ dispatcher ).withIdGenerator (new RandomUUIDGenerator ()).build ();
162163 final Span clientSpan = clientTracer .buildSpan ("Api_call" )
163164 .withTag (Tags .SPAN_KIND .getKey (), Tags .SPAN_KIND_CLIENT )
164165 .start ();
@@ -168,7 +169,7 @@ public void testChildOfSingleSpanTypeWithExtractedContextDoesNotPropagateExtract
168169 //create a server
169170 final Tracer serverTracer = new Tracer .Builder (new NoopMetricsRegistry (),
170171 "ServerService" ,
171- dispatcher ).withIdGenerator (new UUIDv4Generator ()).build ();
172+ dispatcher ).withIdGenerator (new RandomUUIDGenerator ()).build ();
172173 final SpanContext wireContext = serverTracer .extract (Format .Builtin .TEXT_MAP , wireData );
173174 final Span serverSpan = serverTracer .buildSpan ("Api" )
174175 .asChildOf (wireContext )
0 commit comments