public abstract class ServerTracer extends AnnotationSubmitter
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerTracer.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ServerTracer.Builder |
builder() |
void |
clearCurrentSpan()
Clears current span.
|
void |
setServerReceived()
Sets server received event for current request.
|
void |
setServerReceived(int ipv4,
int port,
String clientService)
Like
setServerReceived(), except you can log the network context of the caller, for
example an IP address from the X-Forwarded-For header. |
void |
setServerSend()
Sets the server sent event for current thread.
|
void |
setStateCurrentTrace(long traceId,
long spanId,
Long parentSpanId,
String name)
Sets the current Trace/Span state.
|
void |
setStateNoTracing()
Sets the current Trace/Span state.
|
void |
setStateUnknown(String spanName)
Sets the current Trace/Span state.
|
create, submitAnnotation, submitAnnotation, submitBinaryAnnotation, submitBinaryAnnotationpublic static ServerTracer.Builder builder()
public void clearCurrentSpan()
public void setStateCurrentTrace(long traceId,
long spanId,
@Nullable
Long parentSpanId,
@Nullable
String name)
traceId - Trace id.spanId - Span id.parentSpanId - Parent span id. Can be null.name - Name should not be empty or null.setStateNoTracing(),
setStateUnknown(String)public void setStateNoTracing()
public void setStateUnknown(String spanName)
spanName - The name of our current request/span.public void setServerReceived()
setStateCurrentTrace(long, long, Long, String) , setStateNoTracing() or
setStateUnknown(String).public void setServerReceived(int ipv4,
int port,
@Nullable
String clientService)
setServerReceived(), except you can log the network context of the caller, for
example an IP address from the X-Forwarded-For header.ipv4 - ipv4 of the client as an int. Ex for 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4port - port for client-side of the socket, or 0 if unknownclientService - lowercase name of the callee service or
null if unknownpublic void setServerSend()
Copyright © 2016. All rights reserved.