public final class JaegerTraceExporter extends Object
public static void main(String[] args) {
JaegerTraceExporter.createAndRegister(
JaegerExporterConfiguration.builder().
.setThriftEndpoint("http://127.0.0.1:14268/api/traces")
.setServiceName("myservicename")
.build());
... // Do work.
}
| Modifier and Type | Method and Description |
|---|---|
static void |
createAndRegister(JaegerExporterConfiguration configuration)
Creates and registers the Jaeger Trace exporter to the OpenCensus library using the provided
configurations.
|
static void |
createAndRegister(String thriftEndpoint,
String serviceName)
Deprecated.
in favor of
createAndRegister(JaegerExporterConfiguration). |
static void |
createWithSender(io.jaegertracing.thrift.internal.senders.ThriftSender sender,
String serviceName)
Deprecated.
in favor of
createAndRegister(JaegerExporterConfiguration). |
static void |
unregister()
Unregisters the
JaegerTraceExporter from the OpenCensus library. |
public static void createAndRegister(JaegerExporterConfiguration configuration)
configuration - configurations for this exporter.IllegalStateException - if a Jaeger exporter is already registered.@Deprecated public static void createAndRegister(String thriftEndpoint, String serviceName)
createAndRegister(JaegerExporterConfiguration).thriftEndpoint - the Thrift endpoint of your Jaeger instance, e.g.:
"http://127.0.0.1:14268/api/traces"serviceName - the local service name of the process.IllegalStateException - if a Jaeger exporter is already registered.@Deprecated public static void createWithSender(io.jaegertracing.thrift.internal.senders.ThriftSender sender, String serviceName)
createAndRegister(JaegerExporterConfiguration).sender - the pre-configured ThriftSender to use with the exporterserviceName - the local service name of the process.IllegalStateException - if a Jaeger exporter is already registered.public static void unregister()
JaegerTraceExporter from the OpenCensus library.IllegalStateException - if a Jaeger exporter is not registered.