public final class JaegerTraceExporter extends Object
public static void main(String[] args) {
JaegerTraceExporter.createAndRegister("http://127.0.0.1:14268/api/traces", "myservicename");
... // Do work.
}
| Modifier and Type | Method and Description |
|---|---|
static void |
createAndRegister(String thriftEndpoint,
String serviceName)
Creates and registers the Jaeger Trace exporter to the OpenCensus library.
|
static void |
unregister()
Unregisters the
JaegerTraceExporter from the OpenCensus library. |
public static void createAndRegister(String thriftEndpoint, String serviceName)
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.public static void unregister()
JaegerTraceExporter from the OpenCensus library.IllegalStateException - if a Jaeger exporter is not registered.