public abstract class AbstractTracer extends Object implements io.opentracing.Tracer
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractTracer.InternalLogLevel
For mapping internal logs to Android log levels without importing Android
packages.
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
LIGHTSTEP_TRACER_PLATFORM_KEY |
protected static String |
LIGHTSTEP_TRACER_PLATFORM_VERSION_KEY |
protected static String |
LIGHTSTEP_TRACER_VERSION_KEY |
protected Object |
mutex |
| Constructor and Description |
|---|
AbstractTracer(Options options) |
| Modifier and Type | Method and Description |
|---|---|
io.opentracing.Scope |
activateSpan(io.opentracing.Span span) |
io.opentracing.Span |
activeSpan() |
protected void |
addTracerTag(String key,
Object value) |
io.opentracing.Tracer.SpanBuilder |
buildSpan(String operationName) |
void |
close()
Closes this Tracer.
|
protected void |
debug(String s)
Internal logging.
|
protected void |
debug(String msg,
Throwable throwable)
Internal logging.
|
protected void |
error(String s)
Internal logging.
|
protected void |
error(String msg,
Throwable throwable)
Internal error.
|
<C> io.opentracing.SpanContext |
extract(io.opentracing.propagation.Format<C> format,
C carrier) |
Boolean |
flush(long timeoutMillis)
Initiates a flush of data to the collectors.
|
protected abstract SimpleFuture<Boolean> |
flushInternal(boolean explicitRequest) |
protected void |
info(String s)
Internal logging.
|
protected void |
info(String msg,
Throwable throwable)
Internal logging.
|
<C> void |
inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier) |
boolean |
isDisabled() |
protected abstract void |
printLogToConsole(AbstractTracer.InternalLogLevel level,
String msg,
Throwable throwable) |
io.opentracing.ScopeManager |
scopeManager() |
protected boolean |
sendReport(boolean explicitRequest)
Does the work of a flush by sending spans to the collector.
|
Status |
status()
Internal method used primarily for unit testing and debugging.
|
protected void |
warn(String s)
Internal logging.
|
protected void |
warn(String msg,
Throwable throwable)
Internal warning.
|
protected static final String LIGHTSTEP_TRACER_PLATFORM_KEY
protected static final String LIGHTSTEP_TRACER_PLATFORM_VERSION_KEY
protected static final String LIGHTSTEP_TRACER_VERSION_KEY
protected final Object mutex
public AbstractTracer(Options options)
public boolean isDisabled()
public io.opentracing.ScopeManager scopeManager()
scopeManager in interface io.opentracing.Tracerpublic io.opentracing.Span activeSpan()
activeSpan in interface io.opentracing.Tracerpublic io.opentracing.Scope activateSpan(io.opentracing.Span span)
activateSpan in interface io.opentracing.Tracerpublic io.opentracing.Tracer.SpanBuilder buildSpan(String operationName)
buildSpan in interface io.opentracing.Tracerpublic <C> void inject(io.opentracing.SpanContext spanContext,
io.opentracing.propagation.Format<C> format,
C carrier)
inject in interface io.opentracing.Tracerpublic <C> io.opentracing.SpanContext extract(io.opentracing.propagation.Format<C> format,
C carrier)
extract in interface io.opentracing.Tracerpublic void close()
close in interface io.opentracing.Tracerclose in interface Closeableclose in interface AutoCloseablepublic Boolean flush(long timeoutMillis)
timeoutMillis - The amount of time, in milliseconds, to allow for the flush to completeprotected abstract SimpleFuture<Boolean> flushInternal(boolean explicitRequest)
protected boolean sendReport(boolean explicitRequest)
explicitRequest - if true, the report request was made explicitly rather than implicitly
(via a reporting loop) and therefore the code should make a 'best
effort' to truly report (i.e. send even if the clock state is not
ready).protected void debug(String s)
protected void info(String s)
protected void warn(String s)
protected void error(String s)
protected abstract void printLogToConsole(AbstractTracer.InternalLogLevel level, String msg, Throwable throwable)
public Status status()
Copyright © 2023 LightStep. All rights reserved.