本文整理了Java中brave.Tracing.isNoop()
方法的一些代码示例,展示了Tracing.isNoop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tracing.isNoop()
方法的具体详情如下:
包路径:brave.Tracing
类名称:Tracing
方法名:isNoop
[英]When true, no recording is done and nothing is reported to zipkin. However, trace context is still injected into outgoing requests.
[中]如果为true,则不会进行录制,也不会向zipkin报告任何内容。然而,跟踪上下文仍然被注入到传出请求中。
代码示例来源:origin: openzipkin/brave
if (records.isEmpty() || tracing.isNoop()) return records;
long timestamp = 0L;
Map<String, Span> consumerSpansForTopic = new LinkedHashMap<>();
代码示例来源:origin: openzipkin/brave
void handleReceive(Message message) {
if (message == null || tracing.isNoop()) return;
// remove prior propagation headers from the message
TraceContextOrSamplingFlags extracted = jmsTracing.extractAndClearMessage(message);
Span span = tracer.nextSpan(extracted);
if (!span.isNoop()) {
span.name("receive").kind(Span.Kind.CONSUMER);
Destination destination = destination(message);
if (destination != null) jmsTracing.tagQueueOrTopic(destination, span);
if (remoteServiceName != null) span.remoteServiceName(remoteServiceName);
// incur timestamp overhead only once
long timestamp = tracing.clock(span.context()).currentTimeMicroseconds();
span.start(timestamp).finish(timestamp);
}
jmsTracing.setNextParent(message, span.context());
}
代码示例来源:origin: io.zipkin.brave/brave-instrumentation-kafka-clients
if (records.isEmpty() || tracing.isNoop()) return records;
long timestamp = 0L;
Map<String, Span> consumerSpansForTopic = new LinkedHashMap<>();
内容来源于网络,如有侵权,请联系作者删除!