-
Notifications
You must be signed in to change notification settings - Fork 298
/
Copy pathAgentTracer.java
833 lines (656 loc) · 22.5 KB
/
AgentTracer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
package datadog.trace.bootstrap.instrumentation.api;
import static datadog.trace.api.ConfigDefaults.DEFAULT_ASYNC_PROPAGATING;
import datadog.trace.api.ConfigDefaults;
import datadog.trace.api.DDTraceId;
import datadog.trace.api.EndpointCheckpointer;
import datadog.trace.api.EndpointTracker;
import datadog.trace.api.TraceConfig;
import datadog.trace.api.experimental.DataStreamsCheckpointer;
import datadog.trace.api.experimental.DataStreamsContextCarrier;
import datadog.trace.api.gateway.CallbackProvider;
import datadog.trace.api.gateway.RequestContextSlot;
import datadog.trace.api.gateway.SubscriptionService;
import datadog.trace.api.interceptor.TraceInterceptor;
import datadog.trace.api.internal.InternalTracer;
import datadog.trace.api.internal.TraceSegment;
import datadog.trace.api.sampling.SamplingRule;
import datadog.trace.api.scopemanager.ScopeListener;
import datadog.trace.context.TraceScope;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
public class AgentTracer {
private static final String DEFAULT_INSTRUMENTATION_NAME = "datadog";
// Implicit parent
/** Deprecated. Use {@link #startSpan(String, CharSequence)} instead. */
@Deprecated
public static AgentSpan startSpan(final CharSequence spanName) {
return startSpan(DEFAULT_INSTRUMENTATION_NAME, spanName);
}
/** @see TracerAPI#startSpan(String, CharSequence) */
public static AgentSpan startSpan(final String instrumentationName, final CharSequence spanName) {
return get().startSpan(instrumentationName, spanName);
}
// Implicit parent
/** Deprecated. Use {@link #startSpan(String, CharSequence, long)} instead. */
@Deprecated
public static AgentSpan startSpan(final CharSequence spanName, final long startTimeMicros) {
return startSpan(DEFAULT_INSTRUMENTATION_NAME, spanName, startTimeMicros);
}
/** @see TracerAPI#startSpan(String, CharSequence, long) */
public static AgentSpan startSpan(
final String instrumentationName, final CharSequence spanName, final long startTimeMicros) {
return get().startSpan(instrumentationName, spanName, startTimeMicros);
}
// Explicit parent
/** Deprecated. Use {@link #startSpan(String, CharSequence, AgentSpanContext)} instead. */
@Deprecated
public static AgentSpan startSpan(final CharSequence spanName, final AgentSpanContext parent) {
return startSpan(DEFAULT_INSTRUMENTATION_NAME, spanName, parent);
}
/** @see TracerAPI#startSpan(String, CharSequence, AgentSpanContext) */
public static AgentSpan startSpan(
final String instrumentationName,
final CharSequence spanName,
final AgentSpanContext parent) {
return get().startSpan(instrumentationName, spanName, parent);
}
// Explicit parent
/** Deprecated. Use {@link #startSpan(String, CharSequence, AgentSpanContext, long)} instead. */
@Deprecated
public static AgentSpan startSpan(
final CharSequence spanName, final AgentSpanContext parent, final long startTimeMicros) {
return startSpan(DEFAULT_INSTRUMENTATION_NAME, spanName, parent, startTimeMicros);
}
/** @see TracerAPI#startSpan(String, CharSequence, AgentSpanContext, long) */
public static AgentSpan startSpan(
final String instrumentationName,
final CharSequence spanName,
final AgentSpanContext parent,
final long startTimeMicros) {
return get().startSpan(instrumentationName, spanName, parent, startTimeMicros);
}
public static AgentScope activateSpan(final AgentSpan span) {
return get().activateSpan(span, ScopeSource.INSTRUMENTATION, DEFAULT_ASYNC_PROPAGATING);
}
public static AgentScope activateSpan(final AgentSpan span, final boolean isAsyncPropagating) {
return get().activateSpan(span, ScopeSource.INSTRUMENTATION, isAsyncPropagating);
}
public static AgentScope.Continuation captureSpan(final AgentSpan span) {
return get().captureSpan(span);
}
/**
* Closes the immediately previous iteration scope. Should be called before creating a new span
* for {@link #activateNext(AgentSpan)}.
*/
public static void closePrevious(final boolean finishSpan) {
get().closePrevious(finishSpan);
}
/**
* Activates a new iteration scope; closes automatically after a fixed period.
*
* @see datadog.trace.api.config.TracerConfig#SCOPE_ITERATION_KEEP_ALIVE
*/
public static AgentScope activateNext(final AgentSpan span) {
return get().activateNext(span);
}
public static TraceConfig traceConfig(final AgentSpan span) {
return null != span ? span.traceConfig() : traceConfig();
}
public static TraceConfig traceConfig() {
return get().captureTraceConfig();
}
public static AgentSpan activeSpan() {
return get().activeSpan();
}
public static AgentScope activeScope() {
return get().activeScope();
}
/**
* Checks whether asynchronous propagation is enabled, meaning this context will propagate across
* asynchronous boundaries.
*
* @return {@code true} if asynchronous propagation is enabled, {@code false} otherwise.
*/
public static boolean isAsyncPropagationEnabled() {
return get().isAsyncPropagationEnabled();
}
/**
* Enables or disables asynchronous propagation for the active span.
*
* <p>Asynchronous propagation is enabled by default from {@link
* ConfigDefaults#DEFAULT_ASYNC_PROPAGATING}.
*
* @param asyncPropagationEnabled {@code true} to enable asynchronous propagation, {@code false}
* to disable it.
*/
public static void setAsyncPropagationEnabled(boolean asyncPropagationEnabled) {
get().setAsyncPropagationEnabled(asyncPropagationEnabled);
}
public static AgentPropagation propagate() {
return get().propagate();
}
/**
* Returns the noop span instance.
*
* <p>This instance will always be the same, and can be safely tested using object identity (ie
* {@code ==}).
*
* @return the noop span instance.
*/
public static AgentSpan noopSpan() {
return NoopSpan.INSTANCE;
}
public static AgentSpan blackholeSpan() {
return get().blackholeSpan();
}
/**
* Returns the noop span context instance.
*
* <p>This instance will always be the same, and can be safely tested using object identity (ie
* {@code ==}).
*
* @return the noop scope instance.
*/
public static AgentSpanContext noopSpanContext() {
return NoopSpanContext.INSTANCE;
}
/**
* Returns the noop scope instance.
*
* <p>This instance will always be the same, and can be safely tested using object identity (ie
* {@code ==}).
*
* @return the noop scope instance.
*/
public static AgentScope noopScope() {
return NoopScope.INSTANCE;
}
/**
* Returns the noop continuation instance.
*
* <p>This instance will always be the same, and can be safely tested using object identity (ie
* {@code ==}).
*
* @return the noop continuation instance.
*/
public static AgentScope.Continuation noopContinuation() {
return NoopContinuation.INSTANCE;
}
public static final TracerAPI NOOP_TRACER = new NoopTracerAPI();
private static volatile TracerAPI provider = NOOP_TRACER;
public static boolean isRegistered() {
return provider != NOOP_TRACER;
}
public static synchronized void registerIfAbsent(final TracerAPI tracer) {
if (tracer != null && tracer != NOOP_TRACER) {
provider = tracer;
}
}
public static synchronized void forceRegister(TracerAPI tracer) {
provider = tracer;
}
public static TracerAPI get() {
return provider;
}
// Not intended to be constructed.
private AgentTracer() {}
public interface TracerAPI
extends datadog.trace.api.Tracer, InternalTracer, EndpointCheckpointer, ScopeStateAware {
/**
* Create and start a new span.
*
* @param instrumentationName The instrumentation creating the span.
* @param spanName The span operation name.
* @return The new started span.
*/
AgentSpan startSpan(String instrumentationName, CharSequence spanName);
/**
* Create and start a new span with a given start time.
*
* @param instrumentationName The instrumentation creating the span.
* @param spanName The span operation name.
* @param startTimeMicros The span start time, in microseconds.
* @return The new started span.
*/
AgentSpan startSpan(String instrumentationName, CharSequence spanName, long startTimeMicros);
/**
* Create and start a new span with an explicit parent.
*
* @param instrumentationName The instrumentation creating the span.
* @param spanName The span operation name.
* @param parent The parent span context.
* @return The new started span.
*/
AgentSpan startSpan(String instrumentationName, CharSequence spanName, AgentSpanContext parent);
/**
* Create and start a new span with an explicit parent and a given start time.
*
* @param instrumentationName The instrumentation creating the span.
* @param spanName The span operation name.
* @param parent The parent span context.
* @param startTimeMicros The span start time, in microseconds.
* @return The new started span.
*/
AgentSpan startSpan(
String instrumentationName,
CharSequence spanName,
AgentSpanContext parent,
long startTimeMicros);
AgentScope activateSpan(AgentSpan span, ScopeSource source);
AgentScope activateSpan(AgentSpan span, ScopeSource source, boolean isAsyncPropagating);
AgentScope.Continuation captureSpan(AgentSpan span);
void closePrevious(boolean finishSpan);
AgentScope activateNext(AgentSpan span);
AgentSpan activeSpan();
AgentScope activeScope();
AgentPropagation propagate();
default AgentSpan blackholeSpan() {
final AgentSpan active = activeSpan();
return new BlackHoleSpan(active != null ? active.getTraceId() : DDTraceId.ZERO);
}
/** Deprecated. Use {@link #buildSpan(String, CharSequence)} instead. */
@Deprecated
default SpanBuilder buildSpan(CharSequence spanName) {
return buildSpan(DEFAULT_INSTRUMENTATION_NAME, spanName);
}
SpanBuilder buildSpan(String instrumentationName, CharSequence spanName);
void close();
/**
* Attach a scope listener to the global scope manager
*
* @param listener listener to attach
*/
void addScopeListener(ScopeListener listener);
SubscriptionService getSubscriptionService(RequestContextSlot slot);
CallbackProvider getCallbackProvider(RequestContextSlot slot);
CallbackProvider getUniversalCallbackProvider();
AgentSpanContext notifyExtensionStart(Object event);
void notifyExtensionEnd(AgentSpan span, Object result, boolean isError);
AgentDataStreamsMonitoring getDataStreamsMonitoring();
String getTraceId(AgentSpan span);
String getSpanId(AgentSpan span);
TraceConfig captureTraceConfig();
ProfilingContextIntegration getProfilingContext();
AgentHistogram newHistogram(double relativeAccuracy, int maxNumBins);
/**
* Sets the new service name to be used as a default.
*
* @param serviceName The service name to use as default.
*/
void updatePreferredServiceName(String serviceName);
}
public interface SpanBuilder {
AgentSpan start();
SpanBuilder asChildOf(AgentSpanContext toContext);
SpanBuilder ignoreActiveSpan();
SpanBuilder withTag(String key, String value);
SpanBuilder withTag(String key, boolean value);
SpanBuilder withTag(String key, Number value);
SpanBuilder withTag(String tag, Object value);
SpanBuilder withStartTimestamp(long microseconds);
SpanBuilder withServiceName(String serviceName);
SpanBuilder withResourceName(String resourceName);
SpanBuilder withErrorFlag();
SpanBuilder withSpanType(CharSequence spanType);
<T> SpanBuilder withRequestContextData(RequestContextSlot slot, T data);
SpanBuilder withLink(AgentSpanLink link);
SpanBuilder withSpanId(long spanId);
}
static class NoopTracerAPI implements TracerAPI {
protected NoopTracerAPI() {}
@Override
public AgentSpan startSpan(final String instrumentationName, final CharSequence spanName) {
return NoopSpan.INSTANCE;
}
@Override
public AgentSpan startSpan(
final String instrumentationName, final CharSequence spanName, final long startTimeMicros) {
return NoopSpan.INSTANCE;
}
@Override
public AgentSpan startSpan(
final String instrumentationName,
final CharSequence spanName,
final AgentSpanContext parent) {
return NoopSpan.INSTANCE;
}
@Override
public AgentSpan startSpan(
final String instrumentationName,
final CharSequence spanName,
final AgentSpanContext parent,
final long startTimeMicros) {
return NoopSpan.INSTANCE;
}
@Override
public AgentScope activateSpan(final AgentSpan span, final ScopeSource source) {
return NoopScope.INSTANCE;
}
@Override
public AgentScope activateSpan(
final AgentSpan span, final ScopeSource source, final boolean isAsyncPropagating) {
return NoopScope.INSTANCE;
}
@Override
public AgentScope.Continuation captureSpan(final AgentSpan span) {
return NoopContinuation.INSTANCE;
}
@Override
public boolean isAsyncPropagationEnabled() {
return false;
}
@Override
public void setAsyncPropagationEnabled(boolean asyncPropagationEnabled) {}
@Override
public void closePrevious(final boolean finishSpan) {}
@Override
public AgentScope activateNext(final AgentSpan span) {
return NoopScope.INSTANCE;
}
@Override
public AgentSpan activeSpan() {
return NoopSpan.INSTANCE;
}
@Override
public AgentScope activeScope() {
return null;
}
@Override
public AgentPropagation propagate() {
return NoopAgentPropagation.INSTANCE;
}
@Override
public AgentSpan blackholeSpan() {
return NoopSpan.INSTANCE; // no-op tracer stays no-op
}
@Override
public SpanBuilder buildSpan(final String instrumentationName, final CharSequence spanName) {
return null;
}
@Override
public void close() {}
@Override
public void addScopeListener(
Runnable afterScopeActivatedCallback, Runnable afterScopeClosedCallback) {}
@Override
public void flush() {}
@Override
public void flushMetrics() {}
@Override
public ProfilingContextIntegration getProfilingContext() {
return ProfilingContextIntegration.NoOp.INSTANCE;
}
@Override
public TraceSegment getTraceSegment() {
return null;
}
@Override
public String getTraceId() {
return null;
}
@Override
public String getSpanId() {
return null;
}
@Override
public String getTraceId(AgentSpan span) {
return null;
}
@Override
public String getSpanId(AgentSpan span) {
return null;
}
@Override
public boolean addTraceInterceptor(final TraceInterceptor traceInterceptor) {
return false;
}
@Override
public TraceScope muteTracing() {
return NoopScope.INSTANCE;
}
@Override
public DataStreamsCheckpointer getDataStreamsCheckpointer() {
return getDataStreamsMonitoring();
}
@Override
public void addScopeListener(final ScopeListener listener) {}
@Override
public SubscriptionService getSubscriptionService(RequestContextSlot slot) {
return SubscriptionService.SubscriptionServiceNoop.INSTANCE;
}
@Override
public CallbackProvider getCallbackProvider(RequestContextSlot slot) {
return CallbackProvider.CallbackProviderNoop.INSTANCE;
}
@Override
public CallbackProvider getUniversalCallbackProvider() {
return CallbackProvider.CallbackProviderNoop.INSTANCE;
}
@Override
public void onRootSpanFinished(AgentSpan root, EndpointTracker tracker) {}
@Override
public EndpointTracker onRootSpanStarted(AgentSpan root) {
return EndpointTracker.NO_OP;
}
@Override
public AgentSpanContext notifyExtensionStart(Object event) {
return null;
}
@Override
public void notifyExtensionEnd(AgentSpan span, Object result, boolean isError) {}
@Override
public ScopeState newScopeState() {
return null;
}
@Override
public AgentDataStreamsMonitoring getDataStreamsMonitoring() {
return NoopAgentDataStreamsMonitoring.INSTANCE;
}
@Override
public TraceConfig captureTraceConfig() {
return NoopTraceConfig.INSTANCE;
}
@Override
public AgentHistogram newHistogram(double relativeAccuracy, int maxNumBins) {
return NoopAgentHistogram.INSTANCE;
}
@Override
public void updatePreferredServiceName(String serviceName) {
// no ops
}
}
static class NoopAgentPropagation implements AgentPropagation {
static final NoopAgentPropagation INSTANCE = new NoopAgentPropagation();
@Override
public <C> void injectPathwayContext(
AgentSpan span, C carrier, Setter<C> setter, LinkedHashMap<String, String> sortedTags) {}
@Override
public <C> void injectPathwayContext(
AgentSpan span,
C carrier,
Setter<C> setter,
LinkedHashMap<String, String> sortedTags,
long defaultTimestamp,
long payloadSizeBytes) {}
@Override
public <C> void injectPathwayContextWithoutSendingStats(
AgentSpan span, C carrier, Setter<C> setter, LinkedHashMap<String, String> sortedTags) {}
}
public static class NoopAgentTraceCollector implements AgentTraceCollector {
public static final NoopAgentTraceCollector INSTANCE = new NoopAgentTraceCollector();
@Override
public void registerContinuation(final AgentScope.Continuation continuation) {}
@Override
public void cancelContinuation(final AgentScope.Continuation continuation) {}
}
public static class NoopAgentDataStreamsMonitoring implements AgentDataStreamsMonitoring {
public static final NoopAgentDataStreamsMonitoring INSTANCE =
new NoopAgentDataStreamsMonitoring();
@Override
public void trackBacklog(LinkedHashMap<String, String> sortedTags, long value) {}
@Override
public void setCheckpoint(
AgentSpan span,
LinkedHashMap<String, String> sortedTags,
long defaultTimestamp,
long payloadSizeBytes) {}
@Override
public PathwayContext newPathwayContext() {
return NoopPathwayContext.INSTANCE;
}
@Override
public void add(StatsPoint statsPoint) {}
@Override
public int trySampleSchema(String topic) {
return 0;
}
@Override
public boolean canSampleSchema(String topic) {
return false;
}
@Override
public Schema getSchema(String schemaName, SchemaIterator iterator) {
return null;
}
@Override
public void setProduceCheckpoint(String type, String target) {}
@Override
public void setThreadServiceName(String serviceName) {}
@Override
public void clearThreadServiceName() {}
@Override
public void setConsumeCheckpoint(
String type, String source, DataStreamsContextCarrier carrier) {}
@Override
public void setProduceCheckpoint(
String type, String target, DataStreamsContextCarrier carrier) {}
}
public static class NoopPathwayContext implements PathwayContext {
public static final NoopPathwayContext INSTANCE = new NoopPathwayContext();
@Override
public boolean isStarted() {
return false;
}
@Override
public long getHash() {
return 0L;
}
@Override
public void setCheckpoint(
LinkedHashMap<String, String> sortedTags,
Consumer<StatsPoint> pointConsumer,
long defaultTimestamp,
long payloadSizeBytes) {}
@Override
public void setCheckpoint(
LinkedHashMap<String, String> sortedTags,
Consumer<StatsPoint> pointConsumer,
long defaultTimestamp) {}
@Override
public void setCheckpoint(
LinkedHashMap<String, String> sortedTags, Consumer<StatsPoint> pointConsumer) {}
@Override
public void saveStats(StatsPoint point) {}
@Override
public StatsPoint getSavedStats() {
return null;
}
@Override
public String encode() {
return null;
}
}
public static class NoopAgentHistogram implements AgentHistogram {
public static final NoopAgentHistogram INSTANCE = new NoopAgentHistogram();
@Override
public double getCount() {
return 0;
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public void accept(double value) {}
@Override
public void accept(double value, double count) {}
@Override
public double getValueAtQuantile(double quantile) {
return 0;
}
@Override
public double getMinValue() {
return 0;
}
@Override
public double getMaxValue() {
return 0;
}
@Override
public void clear() {}
@Override
public ByteBuffer serialize() {
return null;
}
}
/** TraceConfig when there is no tracer; this is not the same as a default config. */
public static final class NoopTraceConfig implements TraceConfig {
public static final NoopTraceConfig INSTANCE = new NoopTraceConfig();
@Override
public boolean isTraceEnabled() {
return false;
}
@Override
public boolean isRuntimeMetricsEnabled() {
return false;
}
@Override
public boolean isLogsInjectionEnabled() {
return false;
}
@Override
public boolean isDataStreamsEnabled() {
return false;
}
@Override
public Map<String, String> getServiceMapping() {
return Collections.emptyMap();
}
@Override
public Map<String, String> getRequestHeaderTags() {
return Collections.emptyMap();
}
@Override
public Map<String, String> getResponseHeaderTags() {
return Collections.emptyMap();
}
@Override
public Map<String, String> getBaggageMapping() {
return Collections.emptyMap();
}
@Override
public Double getTraceSampleRate() {
return null;
}
@Override
public Map<String, String> getTracingTags() {
return Collections.emptyMap();
}
@Override
public String getPreferredServiceName() {
return null;
}
@Override
public List<? extends SamplingRule.SpanSamplingRule> getSpanSamplingRules() {
return Collections.emptyList();
}
@Override
public List<? extends SamplingRule.TraceSamplingRule> getTraceSamplingRules() {
return Collections.emptyList();
}
}
}