Search in sources :

Example 1 with SpanExporter

use of io.opencensus.trace.export.SpanExporter in project instrumentation-java by census-instrumentation.

the class CensusSpringAspectTest method teardown.

@After
public void teardown() {
    SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
    exporter.unregisterHandler("testing");
}
Also used : SpanExporter(io.opencensus.trace.export.SpanExporter) After(org.junit.After)

Example 2 with SpanExporter

use of io.opencensus.trace.export.SpanExporter in project instrumentation-java by census-instrumentation.

the class TraceWebAsyncClientAutoConfigurationTest method setup.

@Before
public void setup() {
    handler = new TestHandler();
    SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
    exporter.registerHandler("testing", handler);
    TraceParams params = Tracing.getTraceConfig().getActiveTraceParams().toBuilder().setSampler(Samplers.alwaysSample()).build();
    Tracing.getTraceConfig().updateActiveTraceParams(params);
}
Also used : SpanExporter(io.opencensus.trace.export.SpanExporter) TestHandler(io.opencensus.testing.export.TestHandler) TraceParams(io.opencensus.trace.config.TraceParams) Before(org.junit.Before)

Example 3 with SpanExporter

use of io.opencensus.trace.export.SpanExporter in project instrumentation-java by census-instrumentation.

the class HttpServletFilterIntegrationTests method setup.

@Before
@Override
public void setup() {
    super.setup();
    handler = new TestHandler();
    SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
    exporter.registerHandler("testing", handler);
    TraceParams params = Tracing.getTraceConfig().getActiveTraceParams().toBuilder().setSampler(Samplers.alwaysSample()).build();
    Tracing.getTraceConfig().updateActiveTraceParams(params);
}
Also used : SpanExporter(io.opencensus.trace.export.SpanExporter) TestHandler(io.opencensus.testing.export.TestHandler) TraceParams(io.opencensus.trace.config.TraceParams) Before(org.junit.Before)

Example 4 with SpanExporter

use of io.opencensus.trace.export.SpanExporter in project instrumentation-java by census-instrumentation.

the class HttpServletFilterIntegrationTests method teardown.

@After
public void teardown() {
    SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
    exporter.unregisterHandler("testing");
}
Also used : SpanExporter(io.opencensus.trace.export.SpanExporter) After(org.junit.After)

Example 5 with SpanExporter

use of io.opencensus.trace.export.SpanExporter in project instrumentation-java by census-instrumentation.

the class CensusSpringAspectTest method setup.

@Before
public void setup() {
    handler = new TestHandler();
    SpanExporter exporter = Tracing.getExportComponent().getSpanExporter();
    exporter.registerHandler("testing", handler);
    TraceParams params = Tracing.getTraceConfig().getActiveTraceParams().toBuilder().setSampler(Samplers.alwaysSample()).build();
    Tracing.getTraceConfig().updateActiveTraceParams(params);
}
Also used : SpanExporter(io.opencensus.trace.export.SpanExporter) TestHandler(io.opencensus.testing.export.TestHandler) TraceParams(io.opencensus.trace.config.TraceParams) Before(org.junit.Before)

Aggregations

SpanExporter (io.opencensus.trace.export.SpanExporter)5 TestHandler (io.opencensus.testing.export.TestHandler)3 TraceParams (io.opencensus.trace.config.TraceParams)3 Before (org.junit.Before)3 After (org.junit.After)2