本文整理了Java中io.opencensus.trace.Tracing.getExportComponent()
方法的一些代码示例,展示了Tracing.getExportComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tracing.getExportComponent()
方法的具体详情如下:
包路径:io.opencensus.trace.Tracing
类名称:Tracing
方法名:getExportComponent
[英]Returns the global ExportComponent.
[中]
代码示例来源:origin: googleapis/google-cloud-java
static void exportSpans(String... spans) {
SampledSpanStore store = Tracing.getExportComponent().getSampledSpanStore();
if (store != null) {
store.registerSpanNamesForCollection(Arrays.asList(spans));
}
}
}
代码示例来源:origin: googleapis/google-cloud-java
static void registerAllSpanNamesForCollection() {
Tracing.getExportComponent()
.getSampledSpanStore()
.registerSpanNamesForCollection(ALL_SPAN_NAMES);
}
代码示例来源:origin: GoogleCloudPlatform/java-docs-samples
Tracing.getExportComponent().getSampledSpanStore().registerSpanNamesForCollection(
Arrays.asList(SAMPLE_SPAN));
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Unregisters the Stackdriver Trace exporter from the OpenCensus library.
*
* @throws IllegalStateException if a Stackdriver exporter is not registered.
* @since 0.12
*/
public static void unregister() {
synchronized (monitor) {
checkState(handler != null, "Stackdriver exporter is not registered.");
unregister(Tracing.getExportComponent().getSpanExporter());
handler = null;
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Unregisters the Zipkin Trace exporter from the OpenCensus library.
*
* @throws IllegalStateException if a Zipkin exporter is not registered.
* @since 0.12
*/
public static void unregister() {
synchronized (monitor) {
checkState(handler != null, "Zipkin exporter is not registered.");
unregister(Tracing.getExportComponent().getSpanExporter());
handler = null;
}
}
代码示例来源:origin: com.google.cloud/google-cloud-spanner
static void exportSpans(String... spans) {
SampledSpanStore store = Tracing.getExportComponent().getSampledSpanStore();
if (store != null) {
store.registerSpanNamesForCollection(Arrays.asList(spans));
}
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Unregisters the {@link JaegerTraceExporter} from the OpenCensus library.
*
* @throws IllegalStateException if a Jaeger exporter is not registered.
* @since 0.13
*/
public static void unregister() {
synchronized (monitor) {
checkState(handler != null, "Jaeger exporter is not registered.");
unregister(Tracing.getExportComponent().getSpanExporter());
handler = null;
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Registers the Logging exporter to the OpenCensus library.
*
* @since 0.12
*/
public static void register() {
register(Tracing.getExportComponent().getSpanExporter());
}
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Unregisters the Logging exporter from the OpenCensus library.
*
* @since 0.12
*/
public static void unregister() {
unregister(Tracing.getExportComponent().getSpanExporter());
}
代码示例来源:origin: census-instrumentation/opencensus-java
/**
* Unregisters the OC-Agent exporter from the OpenCensus library.
*
* @since 0.19
*/
public static void unregister() {
unregister(Tracing.getExportComponent().getSpanExporter());
}
代码示例来源:origin: census-instrumentation/opencensus-java
private static void registerInternal(Handler newHandler) {
synchronized (monitor) {
handler = newHandler;
register(Tracing.getExportComponent().getSpanExporter(), newHandler);
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
private static void registerInternal(Handler newHandler) {
synchronized (monitor) {
handler = newHandler;
register(Tracing.getExportComponent().getSpanExporter(), newHandler);
}
}
代码示例来源:origin: io.opencensus/opencensus-exporter-trace-logging
/**
* Unregisters the Logging exporter from the OpenCensus library.
*
* @since 0.12
*/
public static void unregister() {
unregister(Tracing.getExportComponent().getSpanExporter());
}
代码示例来源:origin: io.opencensus/opencensus-exporter-trace-stackdriver
private static void registerInternal(Handler newHandler) {
synchronized (monitor) {
handler = newHandler;
register(Tracing.getExportComponent().getSpanExporter(), newHandler);
}
}
代码示例来源:origin: com.google.cloud/google-cloud-storage
static void registerAllSpanNamesForCollection() {
Tracing.getExportComponent()
.getSampledSpanStore()
.registerSpanNamesForCollection(ALL_SPAN_NAMES);
}
代码示例来源:origin: io.opencensus/opencensus-exporter-trace-logging
/**
* Registers the Logging exporter to the OpenCensus library.
*
* @since 0.12
*/
public static void register() {
register(Tracing.getExportComponent().getSpanExporter());
}
代码示例来源:origin: census-instrumentation/opencensus-java
@Test
public void implementationOfTraceExporter() {
assertThat(Tracing.getExportComponent()).isInstanceOf(ExportComponentImpl.class);
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
@Test
public void implementationOfTraceExporter() {
assertThat(Tracing.getExportComponent()).isInstanceOf(ExportComponentImpl.class);
}
}
代码示例来源:origin: census-instrumentation/opencensus-java
@Test
public void defaultTraceExporter() {
assertThat(Tracing.getExportComponent())
.isInstanceOf(ExportComponent.newNoopExportComponent().getClass());
}
代码示例来源:origin: census-instrumentation/opencensus-java
@After
public void teardown() {
SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
exporter.unregisterHandler("testing");
}
内容来源于网络,如有侵权,请联系作者删除!