@AutoService(value=Writer.class) public class DDAgentWriter extends Object implements Writer
It handles writes asynchronuously so the calling threads are automatically released. However, if too much spans are collected the writers can reach a state where it is forced to drop incoming spans.
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_HOSTNAME
Default location of the DD agent
|
static int |
DEFAULT_PORT |
| Constructor and Description |
|---|
DDAgentWriter() |
DDAgentWriter(DDApi api) |
DDAgentWriter(DDApi api,
com.datadoghq.trace.writer.WriterQueue<List<DDBaseSpan<?>>> queue) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Indicates to the writer that no future writing will come and it should terminates all
connections and tasks
|
void |
start()
Start the writer
|
void |
write(List<DDBaseSpan<?>> trace)
Write a trace represented by the entire list of all the finished spans
|
void |
writeServices(Map<String,Service> services)
Report additional service information to the endpoint
|
public static final String DEFAULT_HOSTNAME
public static final int DEFAULT_PORT
public DDAgentWriter()
public DDAgentWriter(DDApi api)
public DDAgentWriter(DDApi api, com.datadoghq.trace.writer.WriterQueue<List<DDBaseSpan<?>>> queue)
public void write(List<DDBaseSpan<?>> trace)
Writerpublic void writeServices(Map<String,Service> services)
WriterwriteServices in interface Writerservices - a list of extra information about servicespublic void start()
Writer