public final class DatadogTraceExporter extends Object
Example of usage:
public static void main(String[] args) {
DatadogTraceConfiguration config = DatadogTraceConfiguration.builder()
.setAgentEndpoint("http://localhost:8126/v0.3/traces")
.setService("myService")
.setType("web")
.build();
DatadogTraceExporter.createAndRegister(config);
... // Do work.
}
| Modifier and Type | Method and Description |
|---|---|
static void |
createAndRegister(DatadogTraceConfiguration configuration)
Creates and registers the Datadog Trace exporter to the OpenCensus library.
|
static void |
unregister()
Unregisters the Datadog Trace exporter from the OpenCensus library.
|
public static void createAndRegister(DatadogTraceConfiguration configuration) throws MalformedURLException
configuration - the DatadogTraceConfiguration used to create the exporter.MalformedURLException - if the agent URL is invalid.public static void unregister()
IllegalStateException - if a Datadog exporter is not registered.