diff --git a/3.0.6/index.html b/3.0.6/index.html new file mode 100644 index 00000000000..dcf73ce7a94 --- /dev/null +++ b/3.0.6/index.html @@ -0,0 +1,13 @@ +
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+build()
concurrency(int concurrency)
connectionFactory(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
metrics(CollectorMetrics metrics)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
storage
in class CollectorComponent.Builder
sampler
in class CollectorComponent.Builder
metrics
in class CollectorComponent.Builder
build
in class CollectorComponent.Builder
Closeable
, AutoCloseable
static final class
start
in class CollectorComponent
close
in interface AutoCloseable
close
in interface Closeable
close
in class Component
IOException
static ActiveMQCollector.Builder
builder()
concurrency(int concurrency)
connectionFactory(org.apache.activemq.ActiveMQConnectionFactory connectionFactory)
metrics(CollectorMetrics metrics)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+bootstrapServers(String bootstrapServers)
build()
metrics(CollectorMetrics metrics)
final KafkaCollector.Builder
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
streams(int streams)
storage
in class CollectorComponent.Builder
sampler
in class CollectorComponent.Builder
metrics
in class CollectorComponent.Builder
For example: Only consume spans since you connected by setting the below. + +
+ Map<String, String> overrides = new LinkedHashMap<>();
+ overrides.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest");
+ builder.overrides(overrides);
+
ConsumerConfig
build
in class CollectorComponent.Builder
Closeable
, AutoCloseable
span consumer
.
+
+ This collector uses a Kafka 0.10+ consumer.
static final class
start
in class CollectorComponent
bootstrapServers(String bootstrapServers)
static KafkaCollector.Builder
builder()
metrics(CollectorMetrics metrics)
final KafkaCollector.Builder
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
streams(int streams)
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+build()
concurrency(int concurrency)
connectionFactory(com.rabbitmq.client.ConnectionFactory connectionFactory)
metrics(CollectorMetrics metrics)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
storage
in class CollectorComponent.Builder
sampler
in class CollectorComponent.Builder
metrics
in class CollectorComponent.Builder
build
in class CollectorComponent.Builder
Closeable
, AutoCloseable
static final class
start
in class CollectorComponent
close
in interface AutoCloseable
close
in interface Closeable
close
in class Component
IOException
static RabbitMQCollector.Builder
builder()
concurrency(int concurrency)
connectionFactory(com.rabbitmq.client.ConnectionFactory connectionFactory)
metrics(CollectorMetrics metrics)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
+The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+ScribeCollector.start()
was called.port
is already in use.IOException
ClassNotFoundException
IOException
IOException
ClassNotFoundException
IOException
IOException
ClassNotFoundException
IOException
ResultCode success+
ResultCode
build()
metrics(CollectorMetrics metrics)
port(int port)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
storage
in class CollectorComponent.Builder
metrics
in class CollectorComponent.Builder
sampler
in class CollectorComponent.Builder
build
in class CollectorComponent.Builder
Closeable
, AutoCloseable
asynchronous span consumer
.static final class
port
is already in use.start
in class CollectorComponent
start()
was called.metrics(CollectorMetrics metrics)
static ScribeCollector.Builder
newBuilder()
port(int port)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
Serializable
, Comparable<LogEntry._Fields>
, org.apache.thrift.TFieldIdEnum
static LogEntry._Fields
findByName(String name)
static LogEntry._Fields
findByThriftId(int fieldId)
static LogEntry._Fields
findByThriftIdOrThrow(int fieldId)
short
static LogEntry._Fields
static LogEntry._Fields[]
values()
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullgetThriftFieldId
in interface org.apache.thrift.TFieldIdEnum
getFieldName
in interface org.apache.thrift.TFieldIdEnum
Serializable
, Cloneable
, Comparable<LogEntry>
, org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
, org.apache.thrift.TSerializable
static enum
static final Map<LogEntry._Fields,org.apache.thrift.meta_data.FieldMetaData>
void
clear()
int
deepCopy()
boolean
boolean
fieldForId(int fieldId)
getFieldValue(LogEntry._Fields field)
int
hashCode()
boolean
isSet(LogEntry._Fields field)
boolean
boolean
void
read(org.apache.thrift.protocol.TProtocol iprot)
setCategory(String category)
void
setCategoryIsSet(boolean value)
void
setFieldValue(LogEntry._Fields field,
+ Object value)
setMessage(String message)
void
setMessageIsSet(boolean value)
toString()
void
void
void
validate()
void
write(org.apache.thrift.protocol.TProtocol oprot)
deepCopy
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
clear
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
setFieldValue
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
getFieldValue
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
isSet
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
compareTo
in interface Comparable<LogEntry>
fieldForId
in interface org.apache.thrift.TBase<LogEntry,LogEntry._Fields>
read
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
write
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
org.apache.thrift.TException
Serializable
, Comparable<ResultCode>
, org.apache.thrift.TEnum
static ResultCode
findByValue(int value)
int
getValue()
static ResultCode
static ResultCode[]
values()
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullgetValue
in interface org.apache.thrift.TEnum
org.apache.thrift.async.TAsyncClientFactory<Scribe.AsyncClient>
Factory(org.apache.thrift.async.TAsyncClientManager clientManager,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory)
getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport)
getAsyncClient
in interface org.apache.thrift.async.TAsyncClientFactory<Scribe.AsyncClient>
org.apache.thrift.async.TAsyncMethodCall.State
client, transport
Log_call(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler,
+ org.apache.thrift.async.TAsyncClient client,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.transport.TNonblockingTransport transport)
void
write_args(org.apache.thrift.protocol.TProtocol prot)
getClient, getFrameBuffer, getSequenceId, getStartTime, getState, getTimeoutTimestamp, hasTimeout, isFinished, onError, prepareMethodCall
org.apache.thrift.TException
write_args
in class org.apache.thrift.async.TAsyncMethodCall<ResultCode>
org.apache.thrift.TException
getResult
in class org.apache.thrift.async.TAsyncMethodCall<ResultCode>
org.apache.thrift.TException
Scribe.AsyncIface
static class
static class
___currentMethod, ___manager, ___protocolFactory, ___transport
AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.async.TAsyncClientManager clientManager,
+ org.apache.thrift.transport.TNonblockingTransport transport)
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
checkReady, getError, getProtocolFactory, getTimeout, hasError, hasTimeout, onComplete, onError, setTimeout
Log
in interface Scribe.AsyncIface
org.apache.thrift.TException
Scribe.AsyncClient
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
org.apache.thrift.TException
org.apache.thrift.async.AsyncMethodCallback<ResultCode>
getResultHandler(org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
+ int seqid)
protected boolean
isOneway()
void
start(I iface,
+ Scribe.Log_args args,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
getMethodName, sendResponse
getEmptyArgsInstance
in class org.apache.thrift.AsyncProcessFunction<I extends Scribe.AsyncIface,Scribe.Log_args,ResultCode>
getResultHandler
in class org.apache.thrift.AsyncProcessFunction<I extends Scribe.AsyncIface,Scribe.Log_args,ResultCode>
isOneway
in class org.apache.thrift.AsyncProcessFunction<I extends Scribe.AsyncIface,Scribe.Log_args,ResultCode>
start
in class org.apache.thrift.AsyncProcessFunction<I extends Scribe.AsyncIface,Scribe.Log_args,ResultCode>
org.apache.thrift.TException
org.apache.thrift.TAsyncProcessor
, org.apache.thrift.TProcessor
static class
Scribe.AsyncProcessor.Log<I extends Scribe.AsyncIface>
LOGGER
AsyncProcessor(I iface)
protected
AsyncProcessor(I iface,
+ Map<String,org.apache.thrift.AsyncProcessFunction<I,? extends org.apache.thrift.TBase,?>> processMap)
getProcessMapView, process, process
org.apache.thrift.TServiceClientFactory<Scribe.Client>
getClient
in interface org.apache.thrift.TServiceClientFactory<Scribe.Client>
getClient
in interface org.apache.thrift.TServiceClientFactory<Scribe.Client>
Scribe.Iface
iprot_, oprot_, seqid_
getInputProtocol, getOutputProtocol, receiveBase, sendBase, sendBaseOneway
Log
in interface Scribe.Iface
org.apache.thrift.TException
org.apache.thrift.TException
org.apache.thrift.TException
Scribe.Client
org.apache.thrift.TException
Serializable
, Comparable<Scribe.Log_args._Fields>
, org.apache.thrift.TFieldIdEnum
static Scribe.Log_args._Fields
findByName(String name)
static Scribe.Log_args._Fields
findByThriftId(int fieldId)
static Scribe.Log_args._Fields
findByThriftIdOrThrow(int fieldId)
short
static Scribe.Log_args._Fields
static Scribe.Log_args._Fields[]
values()
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullgetThriftFieldId
in interface org.apache.thrift.TFieldIdEnum
getFieldName
in interface org.apache.thrift.TFieldIdEnum
Serializable
, Cloneable
, Comparable<Scribe.Log_args>
, org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
, org.apache.thrift.TSerializable
static enum
static final Map<Scribe.Log_args._Fields,org.apache.thrift.meta_data.FieldMetaData>
void
addToMessages(LogEntry elem)
void
clear()
int
compareTo(Scribe.Log_args other)
deepCopy()
boolean
boolean
equals(Scribe.Log_args that)
fieldForId(int fieldId)
int
int
hashCode()
boolean
isSet(Scribe.Log_args._Fields field)
boolean
void
read(org.apache.thrift.protocol.TProtocol iprot)
void
setFieldValue(Scribe.Log_args._Fields field,
+ Object value)
setMessages(List<LogEntry> messages)
void
setMessagesIsSet(boolean value)
toString()
void
void
validate()
void
write(org.apache.thrift.protocol.TProtocol oprot)
deepCopy
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
clear
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
setFieldValue
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
getFieldValue
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
isSet
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
compareTo
in interface Comparable<Scribe.Log_args>
fieldForId
in interface org.apache.thrift.TBase<Scribe.Log_args,Scribe.Log_args._Fields>
read
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
write
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
org.apache.thrift.TException
Serializable
, Comparable<Scribe.Log_result._Fields>
, org.apache.thrift.TFieldIdEnum
static Scribe.Log_result._Fields
findByName(String name)
static Scribe.Log_result._Fields
findByThriftId(int fieldId)
static Scribe.Log_result._Fields
findByThriftIdOrThrow(int fieldId)
short
static Scribe.Log_result._Fields
static Scribe.Log_result._Fields[]
values()
ResultCode
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullgetThriftFieldId
in interface org.apache.thrift.TFieldIdEnum
getFieldName
in interface org.apache.thrift.TFieldIdEnum
Serializable
, Cloneable
, Comparable<Scribe.Log_result>
, org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
, org.apache.thrift.TSerializable
static enum
static final Map<Scribe.Log_result._Fields,org.apache.thrift.meta_data.FieldMetaData>
Log_result(ResultCode success)
Log_result(Scribe.Log_result other)
void
clear()
int
compareTo(Scribe.Log_result other)
deepCopy()
boolean
boolean
equals(Scribe.Log_result that)
fieldForId(int fieldId)
int
hashCode()
boolean
isSet(Scribe.Log_result._Fields field)
boolean
void
read(org.apache.thrift.protocol.TProtocol iprot)
void
setFieldValue(Scribe.Log_result._Fields field,
+ Object value)
setSuccess(ResultCode success)
void
setSuccessIsSet(boolean value)
toString()
void
void
validate()
void
write(org.apache.thrift.protocol.TProtocol oprot)
ResultCode
deepCopy
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
clear
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
ResultCode
ResultCode
setFieldValue
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
getFieldValue
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
isSet
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
compareTo
in interface Comparable<Scribe.Log_result>
fieldForId
in interface org.apache.thrift.TBase<Scribe.Log_result,Scribe.Log_result._Fields>
read
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
write
in interface org.apache.thrift.TSerializable
org.apache.thrift.TException
org.apache.thrift.TException
getResult(I iface,
+ Scribe.Log_args args)
protected boolean
isOneway()
protected boolean
getMethodName, process
getEmptyArgsInstance
in class org.apache.thrift.ProcessFunction<I extends Scribe.Iface,Scribe.Log_args>
isOneway
in class org.apache.thrift.ProcessFunction<I extends Scribe.Iface,Scribe.Log_args>
rethrowUnhandledExceptions
in class org.apache.thrift.ProcessFunction<I extends Scribe.Iface,Scribe.Log_args>
getResult
in class org.apache.thrift.ProcessFunction<I extends Scribe.Iface,Scribe.Log_args>
org.apache.thrift.TException
org.apache.thrift.TProcessor
static class
Scribe.Processor.Log<I extends Scribe.Iface>
getProcessMapView, process
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
process
static class
static interface
static class
Scribe.AsyncProcessor<I extends Scribe.AsyncIface>
static class
static interface
static class
static class
static class
Scribe.Processor<I extends Scribe.Iface>
static final Map<LogEntry._Fields,org.apache.thrift.meta_data.FieldMetaData>
metaDataMap
fieldForId(int fieldId)
static LogEntry._Fields
findByName(String name)
static LogEntry._Fields
findByThriftId(int fieldId)
static LogEntry._Fields
findByThriftIdOrThrow(int fieldId)
static LogEntry._Fields
static LogEntry._Fields[]
values()
getFieldValue(LogEntry._Fields field)
boolean
isSet(LogEntry._Fields field)
void
setFieldValue(LogEntry._Fields field,
+ Object value)
deepCopy()
setCategory(String category)
setMessage(String message)
getMessages()
getMessagesIterator()
void
addToMessages(LogEntry elem)
int
boolean
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
void
setMessages(List<LogEntry> messages)
Log_call(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler,
+ org.apache.thrift.async.TAsyncClient client,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.transport.TNonblockingTransport transport)
static ResultCode
findByValue(int value)
getResult()
getSuccess()
recv_Log()
static ResultCode
static ResultCode[]
values()
org.apache.thrift.async.AsyncMethodCallback<ResultCode>
getResultHandler(org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
+ int seqid)
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
void
Log(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
void
start(I iface,
+ Scribe.Log_args args,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
Log_call(List<LogEntry> messages,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler,
+ org.apache.thrift.async.TAsyncClient client,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.transport.TNonblockingTransport transport)
getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport)
static class
Scribe.AsyncProcessor<I extends Scribe.AsyncIface>
static class
Scribe.AsyncProcessor.Log<I extends Scribe.AsyncIface>
static class
Scribe.Processor<I extends Scribe.Iface>
static class
Scribe.Processor.Log<I extends Scribe.Iface>
static final Map<Scribe.Log_args._Fields,org.apache.thrift.meta_data.FieldMetaData>
metaDataMap
fieldForId(int fieldId)
static Scribe.Log_args._Fields
findByName(String name)
static Scribe.Log_args._Fields
findByThriftId(int fieldId)
static Scribe.Log_args._Fields
findByThriftIdOrThrow(int fieldId)
static Scribe.Log_args._Fields
static Scribe.Log_args._Fields[]
values()
getFieldValue(Scribe.Log_args._Fields field)
boolean
isSet(Scribe.Log_args._Fields field)
void
setFieldValue(Scribe.Log_args._Fields field,
+ Object value)
deepCopy()
getEmptyArgsInstance()
getEmptyArgsInstance()
setMessages(List<LogEntry> messages)
int
compareTo(Scribe.Log_args other)
boolean
equals(Scribe.Log_args that)
getResult(I iface,
+ Scribe.Log_args args)
void
start(I iface,
+ Scribe.Log_args args,
+ org.apache.thrift.async.AsyncMethodCallback<ResultCode> resultHandler)
Log_args(Scribe.Log_args other)
static final Map<Scribe.Log_result._Fields,org.apache.thrift.meta_data.FieldMetaData>
metaDataMap
fieldForId(int fieldId)
static Scribe.Log_result._Fields
findByName(String name)
static Scribe.Log_result._Fields
findByThriftId(int fieldId)
static Scribe.Log_result._Fields
findByThriftIdOrThrow(int fieldId)
static Scribe.Log_result._Fields
static Scribe.Log_result._Fields[]
values()
getFieldValue(Scribe.Log_result._Fields field)
boolean
isSet(Scribe.Log_result._Fields field)
void
setFieldValue(Scribe.Log_result._Fields field,
+ Object value)
deepCopy()
getResult(I iface,
+ Scribe.Log_args args)
setSuccess(ResultCode success)
int
compareTo(Scribe.Log_result other)
boolean
equals(Scribe.Log_result that)
Log_result(Scribe.Log_result other)
You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+CollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
.CollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
.Collector.acceptSpans(byte[], BytesDecoder, Callback)
, except using a byte buffer.samples spans
to reduce load on the
+ storage system.SpanConsumer.accept(List)
queued for storage} using
+ this component.build()
metrics(CollectorMetrics metrics)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
Callbacks passed do not propagate to the storage layer. They only return success or failures + before storage is attempted. This ensures that calling threads are disconnected from storage + threads.
void
void
void
acceptSpans(byte[] serialized,
+ Callback<Void> callback)
CollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
.void
acceptSpans(byte[] serializedSpans,
+ BytesDecoder<Span> decoder,
+ Callback<Void> callback)
CollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
.void
acceptSpans(ByteBuffer encoded,
+ SpanBytesDecoder decoder,
+ Callback<Void> callback,
+ Executor executor)
acceptSpans(byte[], BytesDecoder, Callback)
, except using a byte buffer.static Collector.Builder
newBuilder(Class<?> loggingClass)
executor
- the executor used to enqueue the storage request.acceptSpans(byte[], BytesDecoder, Callback)
, except using a byte buffer.CollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
. Do not call any other metrics callbacks as those are
+ handled internal to this method.serialized
- not empty messageCollectorMetrics.incrementMessages()
, and CollectorMetrics.incrementBytes(int)
. Do not call any other metrics callbacks as those are
+ handled internal to this method.serializedSpans
- not empty messageabstract CollectorComponent
build()
abstract CollectorComponent.Builder
metrics(CollectorMetrics metrics)
abstract CollectorComponent.Builder
sampler(CollectorSampler sampler)
samples spans
to reduce load on the
+ storage system.abstract CollectorComponent.Builder
storage(StorageComponent storage)
SpanConsumer.accept(List)
queued for storage} using
+ this component.SpanConsumer.accept(List)
queued for storage} using
+ this component.scoped to this transport
. Defaults to no-op.samples spans
to reduce load on the
+ storage system. Defaults to always sample.Closeable
, AutoCloseable
Call start()
to start collecting spans.
abstract CollectorComponent
start()
Many implementations block the calling thread until services are available.
InMemoryCollectorMetrics
decoding them into spans
,
+ apply sampling
, and queues them for storage
.
+
+ Callbacks on this type are invoked by zipkin collectors to improve the visibility of the + system. A typical implementation will report metrics to a telemetry system for analysis and + reporting. + +
A span queried may be comprised of multiple spans collected. While instrumentation should + report complete spans, Instrumentation often patch the same span twice, ex adding annotations. + Also, RPC spans include at least 2 messages due to the client and the server reporting + separately. Finally, some storage components merge patches at ingest. For these reasons, you + should be cautious to alert on queryable spans vs stored spans, unless you control the + instrumentation in such a way that queryable spans/message is reliable. + +
The following relationships can be used to consider health of the tracing system. + +
+
Accepted messages
-
+ Dropped messages
. Alert when this is less than amount of
+ messages sent from instrumentation.Accepted spans
- Dropped spans
. Alert when this drops below the
+ collection-tier sample rate
.
+ forTransport(String transportType)
void
incrementBytes(int quantity)
void
void
void
incrementSpans(int quantity)
void
incrementSpansDropped(int quantity)
For example, an implementation may by default report incremented
+ spans
to the key "zipkin.collector.span.accepted". When metrics.forTransport("kafka"
+ is called, the counter would report to "zipkin.collector.kafka.span.accepted"
transportType
- ex "http", "rabbitmq", "kafka"Note: this count should relate to the raw data structures, like json or thrift, and discount + compression, enveloping, etc.
Debug
spans are always stored.
+
+ Accepts a percentage of trace ids by comparing their absolute value against a potentially
+ dynamic boundary. eg isSampled == abs(traceId) <= boundary
+
+
While idempotent, this implementation's sample rate won't exactly match the input rate because
+ trace ids are not perfectly distributed across 64bits. For example, tests have shown an error
+ rate of 3% when 100K trace ids are random
.
protected abstract long
boundary()
static CollectorSampler
create(float rate)
boolean
toString()
rate
- minimum sample rate is 0.0001, or 0.01% of tracesZipkin v1 allows storage-layer sampling, which can help prevent spikes in traffic from + overloading the system. Debug spans are always stored. + +
This uses only the lower 64 bits of the trace ID as instrumentation still send mixed trace + ID width.
hexTraceId
- the lower 64 bits of the span's trace ID are checked against the boundarydebug
- when true, always passes samplingCollectorMetrics
NOOP_METRICS
int
bytes()
void
clear()
forTransport(String transportType)
void
incrementBytes(int quantity)
void
void
void
incrementSpans(int quantity)
void
incrementSpansDropped(int quantity)
int
messages()
int
int
spans()
int
CollectorMetrics
For example, an implementation may by default report incremented
+ spans
to the key "zipkin.collector.span.accepted". When metrics.forTransport("kafka"
+ is called, the counter would report to "zipkin.collector.kafka.span.accepted"
forTransport
in interface CollectorMetrics
transportType
- ex "http", "rabbitmq", "kafka"CollectorMetrics
incrementMessages
in interface CollectorMetrics
CollectorMetrics
incrementMessagesDropped
in interface CollectorMetrics
CollectorMetrics
Note: this count should relate to the raw data structures, like json or thrift, and discount + compression, enveloping, etc.
incrementBytes
in interface CollectorMetrics
CollectorMetrics
incrementSpans
in interface CollectorMetrics
CollectorMetrics
incrementSpansDropped
in interface CollectorMetrics
metrics(CollectorMetrics metrics)
static Collector.Builder
newBuilder(Class<?> loggingClass)
sampler(CollectorSampler sampler)
storage(StorageComponent storage)
abstract CollectorComponent.Builder
metrics(CollectorMetrics metrics)
abstract CollectorComponent.Builder
sampler(CollectorSampler sampler)
samples spans
to reduce load on the
+ storage system.abstract CollectorComponent.Builder
storage(StorageComponent storage)
SpanConsumer.accept(List)
queued for storage} using
+ this component.abstract CollectorComponent
build()
abstract CollectorComponent
start()
static final CollectorMetrics
NOOP_METRICS
forTransport(String transportType)
metrics(CollectorMetrics metrics)
abstract CollectorComponent.Builder
metrics(CollectorMetrics metrics)
static final CollectorSampler
ALWAYS_SAMPLE
static CollectorSampler
create(float rate)
sampler(CollectorSampler sampler)
abstract CollectorComponent.Builder
sampler(CollectorSampler sampler)
samples spans
to reduce load on the
+ storage system.forTransport(String transportType)
POST
endpoints need to survive failures.ZipkinExtension.httpUrl()
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+POST
endpoints need to survive failures.ZipkinExtension.httpUrl()
.POST
endpoints need to survive failures. Besides simply not
+ starting the zipkin server, you can enqueue failures like this to test edge cases. For example,
+ that you log a failure when a 400 code is returned.static HttpFailure
static HttpFailure
sendErrorResponse(int code,
+ String body)
org.junit.jupiter.api.extension.AfterEachCallback
, org.junit.jupiter.api.extension.BeforeEachCallback
, org.junit.jupiter.api.extension.Extension
httpUrl()
.
+
+ This can be used to test instrumentation. For example, you can POST spans directly to this + server. + +
See http://openzipkin.github.io/zipkin-api/#/
void
afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
enqueueFailure(HttpFailure failure)
int
httpUrl()
void
shutdown()
void
start(int httpPort)
storeSpans(List<Span> spans)
For example, if you are testing what happens when instrumentation adds a child to a trace, + you'd add the parent here.
Ex. If you want to test that you don't repeatedly send bad data, you could send a 400 back. + +
+ zipkin.enqueueFailure(sendErrorResponse(400, "bad format"));
+
failure
- type of failure the next call to the http endpoint responds withhttpPort
- choose 0 to select an available portIOException
IOException
beforeEach
in interface org.junit.jupiter.api.extension.BeforeEachCallback
afterEach
in interface org.junit.jupiter.api.extension.AfterEachCallback
static HttpFailure
disconnectDuringBody()
static HttpFailure
sendErrorResponse(int code,
+ String body)
enqueueFailure(HttpFailure failure)
enqueueFailure(HttpFailure failure)
storeSpans(List<Span> spans)
POST
endpoints need to survive failures.httpUrl()
.POST
endpoints need to survive failures.ZipkinExtension.httpUrl()
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+autocompleteCardinality, autocompleteKeys, autocompleteTtl, contactPoints, ensureSchema, indexFetchMultiplier, keyspace, localDc, maxTraceCols, password, searchEnabled, sslHostnameValidation, strictTraceId, username, useSsl
build()
ensureSchema(boolean ensureSchema)
sessionFactory(CassandraStorage.SessionFactory sessionFactory)
autocompleteCardinality, autocompleteKeys, autocompleteTtl, contactPoints, indexFetchMultiplier, localDc, maxConnections, maxTraceCols, password, poolingOptions, searchEnabled, sslHostnameValidation, strictTraceId, username, useSsl
keyspace
in class zipkin2.storage.cassandra.internal.CassandraStorageBuilder<CassandraStorage.Builder>
ensureSchema
in class zipkin2.storage.cassandra.internal.CassandraStorageBuilder<CassandraStorage.Builder>
build
in class StorageComponent.Builder
com.datastax.oss.driver.api.core.CqlSession
create(CassandraStorage storage)
Closeable
, AutoCloseable
Queries are logged to the category "com.datastax.oss.driver.api.core.cql.QueryLogger" when + debug or trace is enabled via SLF4J. Trace level includes bound values. + +
Schema is installed by default from "/zipkin2-schema.cql" + +
When StorageComponent.Builder.strictTraceId(boolean)
is disabled, span and index data
+ are uniformly written with 64-bit trace ID length. When retrieving data, an extra "trace_id_high"
+ field clarifies if a 128-bit trace ID was sent.
static final class
static interface
check()
void
close()
boolean
static CassandraStorage.Builder
toString()
traces()
spanStore
in class StorageComponent
traces
in class StorageComponent
serviceAndSpanNames
in class StorageComponent
autocompleteTags
in class StorageComponent
spanConsumer
in class StorageComponent
isOverCapacity
in class StorageComponent
ensureSchema(boolean ensureSchema)
static CassandraStorage.Builder
newBuilder()
sessionFactory(CassandraStorage.SessionFactory sessionFactory)
static final CassandraStorage.SessionFactory
DEFAULT
sessionFactory(CassandraStorage.SessionFactory sessionFactory)
com.datastax.oss.driver.api.core.CqlSession
create(CassandraStorage storage)
WebClient
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+WebClient
.RejectedExecutionException
when work is
+ rejected.Span.timestamp()
are at or after
+ (now - lookback) in milliseconds.ElasticsearchStorage.close()
abstract ElasticsearchStorage.Builder
autocompleteCardinality(int autocompleteCardinality)
abstract ElasticsearchStorage.Builder
autocompleteKeys(List<String> autocompleteKeys)
abstract ElasticsearchStorage.Builder
autocompleteTtl(int autocompleteTtl)
abstract ElasticsearchStorage
build()
dateSeparator(char dateSeparator)
abstract ElasticsearchStorage.Builder
ensureTemplates(boolean ensureTemplates)
abstract ElasticsearchStorage.Builder
flushOnWrites(boolean flushOnWrites)
abstract ElasticsearchStorage.Builder
indexReplicas(int indexReplicas)
abstract ElasticsearchStorage.Builder
indexShards(int indexShards)
abstract ElasticsearchStorage.Builder
namesLookback(int namesLookback)
Span.timestamp()
are at or after
+ (now - lookback) in milliseconds.abstract ElasticsearchStorage.Builder
abstract ElasticsearchStorage.Builder
searchEnabled(boolean searchEnabled)
abstract ElasticsearchStorage.Builder
strictTraceId(boolean strictTraceId)
abstract ElasticsearchStorage.Builder
templatePriority(Integer templatePriority)
See https://www.elastic.co/guide/en/elasticsearch/reference/master/pipeline.html
Span.timestamp()
are at or after
+ (now - lookback) in milliseconds. Defaults to 1 day (86400000).See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html
By default, spans with a timestamp falling on 2016/03/19 end up in the index + 'zipkin-span-2016-03-19'. When the date separator is '.', the index would be + 'zipkin-span-2016.03.19'. If the date separator is 0, there is no delimiter. Ex the index + would be 'zipkin-span-20160319'
Corresponds to index.number_of_shards
Corresponds to index.number_of_replicas
See https://www.elastic.co/guide/en/elasticsearch/reference/7.8/_index_template_and_settings_priority.html
strictTraceId
in class StorageComponent.Builder
searchEnabled
in class StorageComponent.Builder
autocompleteKeys
in class StorageComponent.Builder
autocompleteTtl
in class StorageComponent.Builder
autocompleteCardinality
in class StorageComponent.Builder
build
in class StorageComponent.Builder
AutoCloseable
, Closeable
, Supplier<com.linecorp.armeria.client.WebClient>
WebClient
. This is needed because routinely, I/O occurs in
+ constructors and this can delay or cause startup to crash. For example, an underlying EndpointGroup
could be delayed due to DNS, implicit api calls or health checks.default void
close()
com.linecorp.armeria.client.WebClient
get()
toString()
close
in interface AutoCloseable
close
in interface Closeable
Closeable
, AutoCloseable
static class
static interface
WebClient
.check()
void
clear()
void
close()
abstract boolean
abstract zipkin2.elasticsearch.internal.IndexNameFormatter
boolean
RejectedExecutionException
when work is
+ rejected.abstract int
static ElasticsearchStorage.Builder
newBuilder(ElasticsearchStorage.LazyHttpClient lazyHttpClient)
close()
abstract String
pipeline()
abstract boolean
final String
toString()
traces()
version()
close()
spanStore
in class StorageComponent
traces
in class StorageComponent
serviceAndSpanNames
in class StorageComponent
autocompleteTags
in class StorageComponent
spanConsumer
in class StorageComponent
IOException
RejectedExecutionException
when work is
+ rejected. We also classify ResponseTimeoutException
as a capacity related exception
+ even though capacity is not the only reason (timeout could also result from a misconfiguration
+ or a network problem).isOverCapacity
in class StorageComponent
Comparable<ElasticsearchVersion>
static final ElasticsearchVersion
static final ElasticsearchVersion
static final ElasticsearchVersion
static final ElasticsearchVersion
static final ElasticsearchVersion
static final ElasticsearchVersion
compareTo
in interface Comparable<ElasticsearchVersion>
abstract ElasticsearchStorage.Builder
autocompleteCardinality(int autocompleteCardinality)
abstract ElasticsearchStorage.Builder
autocompleteKeys(List<String> autocompleteKeys)
abstract ElasticsearchStorage.Builder
autocompleteTtl(int autocompleteTtl)
dateSeparator(char dateSeparator)
abstract ElasticsearchStorage.Builder
ensureTemplates(boolean ensureTemplates)
abstract ElasticsearchStorage.Builder
flushOnWrites(boolean flushOnWrites)
abstract ElasticsearchStorage.Builder
indexReplicas(int indexReplicas)
abstract ElasticsearchStorage.Builder
indexShards(int indexShards)
abstract ElasticsearchStorage.Builder
namesLookback(int namesLookback)
Span.timestamp()
are at or after
+ (now - lookback) in milliseconds.static ElasticsearchStorage.Builder
newBuilder(ElasticsearchStorage.LazyHttpClient lazyHttpClient)
ElasticsearchStorage.close()
abstract ElasticsearchStorage.Builder
abstract ElasticsearchStorage.Builder
searchEnabled(boolean searchEnabled)
abstract ElasticsearchStorage.Builder
strictTraceId(boolean strictTraceId)
abstract ElasticsearchStorage.Builder
templatePriority(Integer templatePriority)
static ElasticsearchStorage.Builder
newBuilder(ElasticsearchStorage.LazyHttpClient lazyHttpClient)
ElasticsearchStorage.close()
abstract ElasticsearchStorage
build()
static final ElasticsearchVersion
V5_0
static final ElasticsearchVersion
V6_0
static final ElasticsearchVersion
V6_7
static final ElasticsearchVersion
V7_0
static final ElasticsearchVersion
V7_8
static final ElasticsearchVersion
V9_0
version()
int
compareTo(ElasticsearchVersion other)
WebClient
.WebClient
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+autocompleteKeys(List<String> keys)
build()
datasource(DataSource datasource)
listenerProvider(org.jooq.ExecuteListenerProvider listenerProvider)
searchEnabled(boolean searchEnabled)
settings(org.jooq.conf.Settings settings)
strictTraceId(boolean strictTraceId)
autocompleteCardinality, autocompleteTtl
strictTraceId
in class StorageComponent.Builder
searchEnabled
in class StorageComponent.Builder
autocompleteKeys
in class StorageComponent.Builder
build
in class StorageComponent.Builder
Closeable
, AutoCloseable
isOverCapacity
spanStore
in class StorageComponent
traces
in class StorageComponent
serviceAndSpanNames
in class StorageComponent
autocompleteTags
in class StorageComponent
spanConsumer
in class StorageComponent
autocompleteKeys(List<String> keys)
datasource(DataSource datasource)
listenerProvider(org.jooq.ExecuteListenerProvider listenerProvider)
static MySQLStorage.Builder
newBuilder()
searchEnabled(boolean searchEnabled)
settings(org.jooq.conf.Settings settings)
strictTraceId(boolean strictTraceId)
StorageComponent.Builder.autocompleteKeys(List)
has values.SpanStore
implementations that support dependency aggregation.SpanStore
implementations that support dependency aggregation.searchEnabled ==
+ false
.ServiceAndSpanNames
.SpanStore
.SpanStore
implementations.StorageComponent
integration tests.strictTraceId ==
+ false
.Traces
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+StorageComponent.Builder
with parameters for the test being executed.Span.Kind.SERVER
and the Span.localEndpoint()
indicates the service.StorageComponent
before each test rather than the test
+ class.StorageComponent.Builder.autocompleteKeys(List)
has values.SpanStore
implementations that support dependency aggregation.SpanStore
implementations that support dependency aggregation.searchEnabled ==
+ false
.ServiceAndSpanNames
.SpanStore
.SpanStore
implementations.StorageComponent
integration tests.strictTraceId ==
+ false
.Traces
.StorageComponent.Builder
for connecting to the backend for the test.static final Endpoint
static final Span
static final long
static final Endpoint
static final Endpoint
static final Endpoint
static final Span[]
static final long
static final Charset
static String
appendSuffix(String serviceName,
+ String serviceNameSuffix)
static long
static long
midnightUTC(long epochMillis)
static Span
newClientSpan(String serviceNameSuffix)
static String
static Span
span(long traceId)
static Span.Builder
spanBuilder(String serviceNameSuffix)
static long
static Endpoint
suffixServiceName(Endpoint endpoint,
+ String serviceNameSuffix)
StorageComponent.Builder.autocompleteKeys(List)
has values.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getTagsAndValues(org.junit.jupiter.api.TestInfo testInfo)
protected void
ignores_when_key_not_in_autocompleteTags(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
SpanStore
implementations that support dependency aggregation. Subtypes
+ should create a connection to a real backend, even if that backend is in-process.
+
+ This is a replacement for zipkin.storage.DependenciesTest
. There is some redundancy
+ as zipkin2.internal.DependencyLinkerTest
also defines many of these tests. The redundancy
+ helps ensure integrated storage doesn't fail due to mismapping of data, for example.
static Map<Long,List<DependencyLink>>
aggregateLinks(List<Span> spans)
protected void
annotationNamedErrorIsntError(org.junit.jupiter.api.TestInfo testInfo)
protected void
canSearchForIntervalsBesidesToday(org.junit.jupiter.api.TestInfo testInfo)
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
dependencies_headlessTrace(org.junit.jupiter.api.TestInfo testInfo)
protected void
dependencies_loopback(org.junit.jupiter.api.TestInfo testInfo)
protected void
duplicateAddress(org.junit.jupiter.api.TestInfo testInfo)
protected void
empty()
protected void
endTimeBeforeData(org.junit.jupiter.api.TestInfo testInfo)
protected void
protected void
endTsInsideTheTrace(org.junit.jupiter.api.TestInfo testInfo)
protected void
getDependencies(org.junit.jupiter.api.TestInfo testInfo)
protected void
getDependencies_linksMixedTraceId(org.junit.jupiter.api.TestInfo testInfo)
protected void
getDependenciesAllInstrumented(org.junit.jupiter.api.TestInfo testInfo)
Span.Kind.SERVER
and the Span.localEndpoint()
indicates the service.protected void
instrumentedClientAndServer(org.junit.jupiter.api.TestInfo testInfo)
protected void
instrumentedProducerAndConsumer(org.junit.jupiter.api.TestInfo testInfo)
protected void
intermediateSpans(org.junit.jupiter.api.TestInfo testInfo)
protected void
lookbackAfterData(org.junit.jupiter.api.TestInfo testInfo)
protected void
looksBackIndefinitely(org.junit.jupiter.api.TestInfo testInfo)
protected void
missingIntermediateSpan(org.junit.jupiter.api.TestInfo testInfo)
protected void
notInstrumentedClientAndServer(org.junit.jupiter.api.TestInfo testInfo)
protected void
oneway(org.junit.jupiter.api.TestInfo testInfo)
protected void
oneway_noClient(org.junit.jupiter.api.TestInfo testInfo)
protected void
processDependencies(List<Span> spans)
protected void
replayOverwrites(org.junit.jupiter.api.TestInfo testInfo)
protected void
spanKindIsNotRequiredWhenEndpointsArePresent(org.junit.jupiter.api.TestInfo testInfo)
protected void
unnamedEndpointsAreSkipped(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
Exception
Span.Kind.SERVER
and the Span.localEndpoint()
indicates the service.Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
+ span1: SR SS span2: intermediate call span3: CS SR SS CR: Dependency 1
Exception
+ span1: SR SS span2: intermediate call span3: CS SR SS CR: Dependency 1
Exception
Exception
Exception
Exception
SpanStore
implementations that support dependency aggregation.
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
+
+ As these tests create a lot of data, implementations may wish to isolate them from other
+ integration tests such as ITDependencies
protected void
StorageComponent.Builder
with parameters for the test being executed.protected boolean
StorageComponent
before each test rather than the test
+ class.protected void
protected void
processDependencies(List<Span> spans)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent
before each test rather than the test
+ class. Generally, tests will run faster if the storage is initialized as infrequently as
+ possibly while clearing data between runs, but for certain backends like Cassandra, it's
+ difficult to reliably clear data between runs and tends to be very slow anyways.initializeStoragePerTest
in class ITStorage<T extends StorageComponent>
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
searchEnabled ==
+ false
.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getRemoteServiceNames_isEmpty(org.junit.jupiter.api.TestInfo testInfo)
protected void
getServiceNames_isEmpty(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_isEmpty(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_indexDataReturnsNothing(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
ServiceAndSpanNames
.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getLocalServiceNames_includesLocalServiceName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getLocalServiceNames_noServiceName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getRemoteServiceNames(org.junit.jupiter.api.TestInfo testInfo)
protected void
getRemoteServiceNames_allReturned(org.junit.jupiter.api.TestInfo testInfo)
protected void
getRemoteServiceNames_dedupes(org.junit.jupiter.api.TestInfo testInfo)
protected void
getRemoteServiceNames_noRemoteServiceName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getRemoteServiceNames_serviceNameGoesLowercase(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_allReturned(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_dedupes(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_doesNotMapNameToRemoteServiceName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_noSpanName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getSpanNames_serviceNameGoesLowercase(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
SpanStore
.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
protected void
protected void
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
consumer_implementsCall_execute(org.junit.jupiter.api.TestInfo testInfo)
protected void
consumer_implementsCall_submit(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_absentWhenNoTimestamp(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_annotation(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_considersBitsAbove64bit(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_differentiateOnServiceName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_differentiatesDebugFromShared(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_duration(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_endTsAndLookback(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_endTsInsideTheTrace(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_filteringMatchesMostRecentTraces(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_groupsTracesTogether(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_lateDuration(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_limit(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_maxDuration(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_minDuration(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_multipleAnnotationsBecomeAndFilter(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_serviceNames(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_serviceNames_mixedTraceIdLength(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_spanName(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_spanName_mixedTraceIdLength(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_tags(org.junit.jupiter.api.TestInfo testInfo)
protected void
names_goLowercase(org.junit.jupiter.api.TestInfo testInfo)
protected void
readback_minimalErrorSpan(org.junit.jupiter.api.TestInfo testInfo)
protected void
readsBackLargeValues(org.junit.jupiter.api.TestInfo testInfo)
protected void
spanWithProblematicData(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Notably this guards empty tag values work
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Exception
SpanStore
implementations. Subtypes should create a connection to a
+ real backend, even if that backend is in-process.
+
+ As these tests create a lot of data, implementations may wish to isolate them from other
+ integration tests such as ITSpanStore
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getTraces_manyTraces(org.junit.jupiter.api.TestInfo testInfo)
protected boolean
StorageComponent
before each test rather than the test
+ class.protected void
traceWithManySpans(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent
before each test rather than the test
+ class. Generally, tests will run faster if the storage is initialized as infrequently as
+ possibly while clearing data between runs, but for certain backends like Cassandra, it's
+ difficult to reliably clear data between runs and tends to be very slow anyways.initializeStoragePerTest
in class ITStorage<T extends StorageComponent>
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
ITAutocompleteTags
, ITDependencies
, ITDependenciesHeavy
, ITSearchEnabledFalse
, ITServiceAndSpanNames
, ITSpanStore
, ITSpanStoreHeavy
, ITStrictTraceIdFalse
, ITTraces
StorageComponent
integration tests.protected final void
protected final void
protected void
assertGetTraceReturns(String traceId,
+ List<Span> trace)
protected void
assertGetTraceReturns(Span onlySpan)
protected void
assertGetTraceReturnsEmpty(String traceId)
protected void
assertGetTracesReturns(List<String> traceIds,
+ List<Span>... traces)
protected void
assertGetTracesReturns(QueryRequest request,
+ List<Span>... traces)
protected void
assertGetTracesReturnsCount(QueryRequest request,
+ int traceCount)
protected void
assertGetTracesReturnsEmpty(List<String> traceIds)
protected void
assertGetTracesReturnsEmpty(QueryRequest request)
protected void
protected void
protected abstract void
clear()
protected abstract void
StorageComponent.Builder
with parameters for the test being executed.protected boolean
StorageComponent
before each test rather than the test
+ class.protected ServiceAndSpanNames
names()
protected abstract StorageComponent.Builder
newStorageBuilder(org.junit.jupiter.api.TestInfo testInfo)
StorageComponent.Builder
for connecting to the backend for the test.protected static QueryRequest.Builder
protected boolean
protected SpanStore
store()
protected static String
testSuffix(org.junit.jupiter.api.TestInfo testInfo)
protected Traces
traces()
StorageComponent
before each test rather than the test
+ class. Generally, tests will run faster if the storage is initialized as infrequently as
+ possibly while clearing data between runs, but for certain backends like Cassandra, it's
+ difficult to reliably clear data between runs and tends to be very slow anyways.StorageComponent.Builder
for connecting to the backend for the test.StorageComponent.Builder
with parameters for the test being executed.IOException
IOException
Exception
IOException
IOException
IOException
IOException
IOException
IOException
IOException
IOException
strictTraceId ==
+ false
.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process. + +
This is a replacement for zipkin.storage.StrictTraceIdFalseTest
.
accept128BitTrace(StorageComponent storage,
+ org.junit.jupiter.api.TestInfo testInfo)
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getTrace_retrievesBy64Or128BitTraceId(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTrace_retrievesBy64Or128BitTraceId_mixed(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_128BitTraceId(List<Span> trace,
+ org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_128BitTraceId(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_128BitTraceId_mixed(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_retrievesBy64Or128BitTraceId(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
Exception
Exception
Exception
Traces
.
+
+ Subtypes should create a connection to a real backend, even if that backend is in-process.
protected final void
StorageComponent.Builder
with parameters for the test being executed.protected void
getTrace_deduplicates(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTrace_differentiatesDebugFromShared(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTrace_returnsEmptyOnNotFound(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_differentiatesDebugFromShared(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_onlyReturnsTracesThatMatch(org.junit.jupiter.api.TestInfo testInfo)
protected void
getTraces_returnsEmptyOnNotFound(org.junit.jupiter.api.TestInfo testInfo)
accept, accept, assertGetTraceReturns, assertGetTraceReturns, assertGetTraceReturnsEmpty, assertGetTracesReturns, assertGetTracesReturns, assertGetTracesReturnsCount, assertGetTracesReturnsEmpty, assertGetTracesReturnsEmpty, blockWhileInFlight, checkStorage, clear, initializeStoragePerTest, names, newStorageBuilder, requestBuilder, returnsRawSpans, sortTrace, store, testSuffix, traces
ITStorage
StorageComponent.Builder
with parameters for the test being executed.configureStorageForTest
in class ITStorage<T extends StorageComponent>
Exception
Exception
Exception
Exception
Exception
Exception
class
ITAutocompleteTags<T extends StorageComponent>
StorageComponent.Builder.autocompleteKeys(List)
has values.class
ITDependencies<T extends StorageComponent>
SpanStore
implementations that support dependency aggregation.class
ITDependenciesHeavy<T extends StorageComponent>
SpanStore
implementations that support dependency aggregation.class
ITSearchEnabledFalse<T extends StorageComponent>
searchEnabled ==
+ false
.class
ITServiceAndSpanNames<T extends StorageComponent>
ServiceAndSpanNames
.class
ITSpanStore<T extends StorageComponent>
SpanStore
.class
ITSpanStoreHeavy<T extends StorageComponent>
SpanStore
implementations.class
ITStrictTraceIdFalse<T extends StorageComponent>
strictTraceId ==
+ false
.class
ITTraces<T extends StorageComponent>
Traces
.StorageComponent.Builder.autocompleteKeys(List)
has values.SpanStore
implementations that support dependency aggregation.SpanStore
implementations that support dependency aggregation.searchEnabled ==
+ false
.ServiceAndSpanNames
.SpanStore
.SpanStore
implementations.StorageComponent
integration tests.strictTraceId ==
+ false
.Traces
.SpanConsumer
.synchronously
or asynchronously
.SpanConsumer
.SpanBytesEncoder
, as it isn't needed for instrumentationSpanConsumer
.strict trace ID
is disabled.SpanConsumer
.Span.tags()
.Span
.public static final int
0
public static final int
6
Annotation
.Span.tags()
.Span
.You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:
+j.l.obj
will match "java.lang.Object"InpStr
will match "java.io.InputStream"HM.cK
will match "java.util.HashMap.containsKey(Object)"Refer to the Javadoc Search Specification for a full description of search features.
+The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.
+Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.
+The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Packages and modules may contain pages with additional information related to the declarations nearby.
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object
. Interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to shortcomings, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Constant Field Values page lists the static final fields and their values.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to those who implement rather than use the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See Also" section of the class description.
+The All Packages page contains an alphabetic index of all packages contained in the documentation.
+The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.
+The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.
+Span.annotations
V1Span.annotations()
Span.tags()
except duplicating the
+ endpoint.Span.remoteEndpoint()
Span.annotations()
+ include a value in this set, or where Span.tags()
include a key is in this set.Span.annotations()
, except each may be associated with Span.localEndpoint()
SpanConsumer
.Span.tags()
are allocated to binary annotations with a V1BinaryAnnotation.stringValue()
.synchronously
or asynchronously
.DependencyLink.parent
to DependencyLink.child
Span.localServiceName()
if instrumented.Span.annotations
Span.tags
Annotation.timestamp
, then Annotation.value
.V1Annotation.timestamp()
, then V1Annotation.value()
.V1BinaryAnnotation.key
Span.timestamp()
is the moment a consumer received a message from an
+ origin.Span.remoteEndpoint()
Span.tags()
except duplicating the
+ endpoint.Span.debug()
Span.debug()
Span.debug()
V1Span.debug()
list
.BytesDecoder.decodeList(byte[], Collection)
true
if an element was decoded or throws IllegalArgumentException
.BytesDecoder.decodeList(byte[])
.BytesDecoder.decodeList(byte[])
.BytesDecoder.decodeOne(byte[])
IllegalArgumentException
if the input isn't a json, proto3 or thrift list
+ message.IllegalArgumentException
if the input isn't a v1 json or thrift single-span
+ messageSpan.durationAsLong()
V1Span.duration()
Span.duration()
Span.duration()
except returns a primitive where zero implies absent.V1BinaryAnnotation.stringValue()
is present, this is the same as the Span.localEndpoint()
+ Otherwise, it is the same as the Span.remoteEndpoint()
.Span.timestamp()
are at or before this time in epoch
+ milliseconds.QueryRequest.endTs()
callback
when complete.flatMapper
function.AutocompleteTags.getValues(String)
.local
service names
,
+ sorted lexicographically.span names
recorded by a service
, sorted lexicographically.V1Span.id()
Span.id()
except packed into a long.Span.id()
or throws IllegalArgumentException if the
+ input is zero.V1Span.id()
Span.id()
or throws IllegalArgumentException
if not lower-hex format.Span.Builder.id(String)
Endpoint.Builder.parseIp(String)
Endpoint.Builder.parseIp(InetAddress)
Span.tags()
v2 span tag}Span.remoteEndpoint
Span.kind
QueryRequest.limit()
Encoding.listSizeInBytes(List)
, except for a single element.Span.localEndpoint
Span.timestamp()
are at or after (endTs - lookback) in
+ milliseconds.mapper
function.Span.duration()
is less than or equal to maxDuration
+ microseconds.Span.duration()
is greater than or equal to minDuration
+ microseconds.Span.name()
Span.name
V1Span.name()
Span.localServiceName()
if instrumented.Span.id
or null if this the root span in a trace.V1Span.id()
or zero if this the root span in a trace.Span.parentId()
or unsets if the input is zero.V1Span.parentId()
Span.parentId()
or throws IllegalArgumentException
if not lower-hex
+ format.Span.Builder.parentId(String)
Endpoint.Builder.parseIp(String)
except this accepts a byte array.Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.Endpoint.portAsInt()
Endpoint.port()
except returns a primitive where zero implies absent.Span.timestamp()
is the moment a producer sent a message to a destination.Span.tags
Span.remoteEndpoint
remote service
+ name
.StorageComponent.traces()
+ supported.SpanConsumer
.local service name
and
+ constrains all other parameters.Endpoint.serviceName
Span.shared()
Span.shared()
SpanBytesEncoder
, as it isn't needed for instrumentationSpan.name()
SpanConsumer
.strict trace ID
is disabled.Span.tags()
v2 span tag} or null if this is an addressSpan.timestampAsLong()
V1Span.timestamp()
Span.timestamp()
Span.timestamp()
except returns a primitive where zero implies absent.V1Span.traceId()
Span.traceId()
V1Span.traceId()
Span.id()
or throws IllegalArgumentException
if not lower-hex format.Span.Builder.traceId(String)
V1Span.traceIdHigh()
V1Span.traceIdHigh()
SpanConsumer
.Annotation
.Span.tags()
.Span
.cache.miss
or error
Annotation.value()
ObjectStreamException
long timestamp+
String value+
ObjectStreamException
ObjectStreamException
ObjectStreamException
List<Annotation> annotations+
long duration+
int flags+
String id+
Span.Kind kind+
Endpoint localEndpoint+
String name+
String parentId+
Endpoint remoteEndpoint+
Map<String,+String> tags
long timestamp+
String traceId+
Serializable
, Comparable<Annotation>
Unlike log statements, annotations are often codes: Ex. cache.miss
.
int
compareTo(Annotation that)
timestamp
, then value
.static Annotation
boolean
int
hashCode()
long
toString()
value()
cache.miss
or error
This value should be set directly by instrumentation, using the most precise value possible.
+ For example, gettimeofday
or multiplying System.currentTimeMillis()
by 1000.
cache.miss
or error
timestamp
, then value
.compareTo
in interface Comparable<Annotation>
Cloneable
Call.Base<V>, Call.ErrorHandler<V>, Call.FlatMapper<V1,V2>, Call.Mapper<V1,V2>
final void
cancel()
protected void
doCancel()
protected abstract void
protected abstract V
protected boolean
final void
callback
when complete.final V
execute()
final boolean
clone, create, emptyList, flatMap, handleError, map, propagateIfFatal
Call
Eventhough this is a blocking call, implementations may honor calls to Call.cancel() from a different thread.
execute
in class Call<V>
V
is Void.IOException
IOException
Call
callback
when complete. Invoking this
+ more than once will result in an error. To repeat a call, make a copy with Call.clone().Call
Call
Calls can fail before being canceled, so true does always mean cancelation caused a call to + fail. That said, successful cancellation does result in a failure.
isCanceled
in class Call<V>
void
onErrorReturn(Throwable error,
+ Callback<V> callback)
GroupByTraceId
V
- the success type, typically not null except when V
is Void.Cloneable
Call.Base
synchronously
or asynchronously
. At any time, from any thread, you
+ can call cancel(), which might stop an in-flight request or prevent one from
+ occurring.
+
+ Implementations should prepare a call such that there's little or no likelihood of late
+ runtime exceptions. For example, if the call is to get a trace, the call to listSpans
+ should propagate input errors vs delay them until a call to execute() or
+ enqueue(Callback).
+
+
Ex. +
+ // Any translation of an input request to remote parameters should happen here, and any related
+ // errors should propagate here.
+ Call<List<List<Span>>> listTraces = spanStore.listTraces(request);
+ // When this executes, it should simply run the remote request.
+ List<Span> trace = getTraceCall.execute();
+
+
+ An instance of call cannot be invoked more than once, but you can clone() an + instance if you need to replay the call. There is no relationship between a call and a number of + remote requests. For example, an implementation that stores spans may make hundreds of remote + requests, possibly retrying on your behalf. + +
This type owes its design to retrofit2.Call
, which is nearly the same, except limited
+ to HTTP transports.
static class
static interface
static interface
static interface
abstract void
cancel()
clone()
static <V> Call<V>
create(V v)
abstract void
callback
when complete.abstract V
execute()
final <R> Call<R>
flatMap(Call.FlatMapper<V,R> flatMapper)
flatMapper
function.handleError(Call.ErrorHandler<V> errorHandler)
abstract boolean
final <R> Call<R>
map(Call.Mapper<V,R> mapper)
mapper
function.static void
mapper
function.
+ This is used to convert values from one type to another. For example, you could use this to
+ convert between zipkin v1 and v2 span format.
+
+
+ getTracesV1Call = getTracesV2Call.map(traces -> v2TracesConverter);
+
+
+ This method intends to be used for chaining. That means "this" instance should be discarded + in favor of the result of this method.
flatMapper
function. This
+ is used to chain two remote calls together. For example, you could use this to chain a list IDs
+ call to a get by IDs call.
+
+
+ getTracesCall = getIdsCall.flatMap(ids -> getTraces(ids));
+
+ // this would now invoke the chain
+ traces = getTracesCall.enqueue(tracesCallback);
+
+
+ Cancelation propagates to the mapped call.
+
+ This method intends to be used for chaining. That means "this" instance should be discarded + in favor of the result of this method.
Here's an example of coercing 404 to empty: +
+ call.handleError((error, callback) -> {
+ if (error instanceof HttpException && ((HttpException) error).code == 404) {
+ callback.onSuccess(Collections.emptyList());
+ } else {
+ callback.onError(error);
+ }
+ });
+
Eventhough this is a blocking call, implementations may honor calls to cancel() from a different thread.
V
is Void.IOException
callback
when complete. Invoking this
+ more than once will result in an error. To repeat a call, make a copy with clone().Calls can fail before being canceled, so true does always mean cancelation caused a call to + fail. That said, successful cancellation does result in a failure.
This is a bridge to async libraries such as CompletableFuture complete, completeExceptionally. + +
Implementations will call either onSuccess(V)
or onError(java.lang.Throwable)
, but not both.
When this is called, onError(java.lang.Throwable)
won't be.
When this is called, onSuccess(V)
won't be.
Implementations should initialize the component if necessary. It should test a remote + connection, or consult a trusted source to derive the result. They should use least resources + possible to establish a meaningful result, and be safe to call many times, even concurrently.
OK
Closeable
, AutoCloseable
StorageComponent
Components are lazy with regards to I/O. They can be injected directly to other components so + as to avoid crashing the application graph if a network service is unavailable.
Implementations should initialize the component if necessary. It should test a remote + connection, or consult a trusted source to derive the result. They should use least resources + possible to establish a meaningful result, and be safe to call many times, even concurrently.
For example, if this created a connection, it would close it. If it was provided one, this + would close any sessions, but leave the connection open.
close
in interface AutoCloseable
close
in interface Closeable
IOException
build()
callCount(long callCount)
errorCount(long errorCount)
Serializable
long
parent
to child
child()
Span.localServiceName()
if instrumented.boolean
long
int
hashCode()
static DependencyLink.Builder
parent()
Span.localServiceName()
if instrumented.toString()
Span.localServiceName()
if instrumented.Span.localServiceName()
if instrumented.parent
to child
build()
parseIp(String)
ip(InetAddress addr)
parseIp(InetAddress)
boolean
parseIp(byte[] ipBytes)
parseIp(String)
except this accepts a byte array.boolean
Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.boolean
parseIp(InetAddress addr)
Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.port(int port)
Endpoint.portAsInt()
serviceName(String serviceName)
Endpoint.serviceName
Endpoint.serviceName
parseIp(InetAddress)
Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.
+
+ Returns boolean not this for conditional parsing. For example: +
+ if (!builder.parseIp(input.getHeader("X-Forwarded-For"))) {
+ builder.parseIp(input.getRemoteAddr());
+ }
+
parseIp(String)
except this accepts a byte array.ipBytes
- byte array whose ownership is exclusively transferred to this endpoint.parseIp(String)
Endpoint.ipv4()
or Endpoint.ipv6()
could be parsed from the
+ input.
+
+ Returns boolean not this for conditional parsing. For example: +
+ if (!builder.parseIp(input.getHeader("X-Forwarded-For"))) {
+ builder.parseIp(input.getRemoteAddr());
+ }
+
port
- port associated with the endpoint. zero coerces to null (unknown)Endpoint.portAsInt()
Serializable
boolean
int
hashCode()
ipv4()
byte[]
ipv6()
byte[]
static Endpoint.Builder
port()
int
port()
except returns a primitive where zero implies absent.toString()
This is a primary label for trace lookup and aggregation, so it should be intuitive and + consistent. Many use a name from service discovery.
port()
except returns a primitive where zero implies absent.
+
+ Using this method will avoid allocation, so is encouraged when copying data.
addAnnotation(long timestamp,
+ String value)
Span.annotations
build()
clear()
Span.annotations
Span.tags
clone()
debug(boolean debug)
Span.debug()
Span.debug()
duration(long duration)
Span.duration()
id(long id)
Span.id()
or throws IllegalArgumentException if the
+ input is zero.Span.id()
or throws IllegalArgumentException
if not lower-hex format.kind()
Span.kind
localEndpoint(Endpoint localEndpoint)
Span.localEndpoint
Span.name
parentId(long parentId)
Span.parentId()
or unsets if the input is zero.Span.parentId()
or throws IllegalArgumentException
if not lower-hex
+ format.Span.tags
remoteEndpoint(Endpoint remoteEndpoint)
Span.remoteEndpoint
shared(boolean shared)
Span.shared()
Span.shared()
timestamp(long timestamp)
Span.timestamp()
traceId(long high,
+ long low)
Span.id()
or throws IllegalArgumentException
if not lower-hex format.Span.id()
or throws IllegalArgumentException
if not lower-hex format.high
- Upper 64bits of the trace ID. Zero means the trace ID is 64-bit.low
- Lower 64bits of the trace ID.IllegalArgumentException
- if both values are zeroSpan.parentId()
or unsets if the input is zero.Span.parentId()
or throws IllegalArgumentException
if not lower-hex
+ format.Span.id()
or throws IllegalArgumentException if the
+ input is zero.Span.id()
or throws IllegalArgumentException
if not lower-hex format.Span.kind
Span.name
Span.timestamp()
Span.duration()
Span.localEndpoint
Span.remoteEndpoint
Span.annotations
Span.annotations
Span.tags
Span.tags
Span.debug()
Span.debug()
Span.shared()
Span.shared()
Serializable
, Comparable<Span.Kind>
Span.timestamp()
is the moment a consumer received a message from an
+ origin.Span.timestamp()
is the moment a producer sent a message to a destination.Span.timestamp()
is the moment a producer sent a message to a destination.
+ Span.duration()
represents delay sending the message, such as batching, while Span.remoteEndpoint()
indicates the destination, such as a broker.
+
+ Unlike CLIENT
, messaging spans never share a span ID. For example, the CONSUMER
of the same message has Span.parentId()
set to this span's Span.id()
.
Span.timestamp()
is the moment a consumer received a message from an
+ origin. Span.duration()
represents delay consuming the message, such as from backlog,
+ while Span.remoteEndpoint()
indicates the origin, such as a broker.
+
+ Unlike SERVER
, messaging spans never share a span ID. For example, the PRODUCER
of this message is the Span.parentId()
of this span.
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullSerializable
parentId
field establishes the position of one span in the tree.
+
+ The root span is where parentId
is null and usually has the longest duration
in the trace. However, nested asynchronous work can materialize as child spans whose
+ duration exceed the root span.
+
+
Spans usually represent remote activity such as RPC calls, or messaging producers and + consumers. However, they can also represent in-process activity in any position of the trace. For + example, a root span could represent a server receiving an initial client request. A root span + could also represent a scheduled job that has no remote context. + +
While span identifiers are packed into longs, they should be treated opaquely. ID encoding is + 16 or 32 character lower-hex, to avoid signed interpretation. + +
zipkin.Span
This type is intended to replace use of zipkin.Span
. Particularly, tracers represent
+ a single-host view of an operation. By making one endpoint implicit for all data, this type does
+ not need to repeat endpoints on each data like zipkin.Span
does. This results in simpler
+ and smaller data.
static final class
static enum
debug()
duration()
long
duration()
except returns a primitive where zero implies absent.boolean
int
hashCode()
id()
kind()
remoteEndpoint
name()
static Span.Builder
static String
normalizeTraceId(String traceId)
parentId()
id
or null if this the root span in a trace.shared()
tags()
long
timestamp()
except returns a primitive where zero implies absent.toString()
traceId()
Encoded as 16 or 32 lowercase hex characters corresponding to 64 or 128 bits. For example,
+ a 128bit trace ID looks like 4e441824ec2b6a44ffdc9bb9a6453df3
.
+
+
Some systems downgrade trace identifiers to 64bit by dropping the left-most 16 characters.
+ For example, 4e441824ec2b6a44ffdc9bb9a6453df3
becomes ffdc9bb9a6453df3
.
id
or null if this the root span in a trace.
+
+ This is the same encoding as id
. For example ffdc9bb9a6453df3
Encoded as 16 lowercase hex characters. For example ffdc9bb9a6453df3
+
+
A span is uniquely identified in storage by (traceId, id()).
remoteEndpoint
Conventionally, when the span name isn't known, name = "unknown".
This value should be set directly by instrumentation, using the most precise value
+ possible. For example, gettimeofday
or multiplying System.currentTimeMillis()
by
+ 1000.
+
+
There are three known edge-cases where this could be reported absent: + +
Note: timestamps at or before epoch (0L == 1970) are invalid
timestamp()
except returns a primitive where zero implies absent.
+
+ Using this method will avoid allocation, so is encouraged when copying data.
This value should be set directly, as opposed to implicitly via annotation timestamps. + Doing so encourages precision decoupled from problems of clocks, such as skew or NTP updates + causing time to move backwards. + +
If this field is persisted as unset, zipkin will continue to work, except duration query + support will be implementation-specific. Similarly, setting this field non-atomically is + implementation-specific. + +
This field is i64 vs i32 to support spans longer than 35 minutes.
duration()
except returns a primitive where zero implies absent.
+
+ Using this method will avoid allocation, so is encouraged when copying data.
Instrumentation should always record this and be consistent as possible with the service + name as it is used in search. This is nullable for legacy reasons.
By recording the remote endpoint, your trace will contain network context even if the peer
+ is not tracing. For example, you can record the IP from the X-Forwarded-For
header or
+ the service name and socket of a remote peer.
For example, a tag key could be "http.path"
.
kind()
to be Span.Kind.SERVER
.
+
+ When an RPC trace is client-originated, it will be sampled and the same span ID is used for + the server side. However, the server shouldn't set span.timestamp or duration since it didn't + start the span.
IllegalArgumentException
- if oversized or not lower-hexFor example, we can identify the encoding and also the format in http via the request path + and content-type. However, in Kafka it could be that folks send mixed Zipkin data without + identifying its format. For example, Kafka historically has no content-type and users don't + always segregate different queues by instrumentation format.
static BytesDecoder<Span>
decoderForListMessage(byte[] spans)
IllegalArgumentException
if the input isn't a json, proto3 or thrift list
+ message.static BytesDecoder<Span>
decoderForListMessage(ByteBuffer spans)
static BytesDecoder<Span>
decoderForMessage(byte[] span)
IllegalArgumentException
if the input isn't a v1 json or thrift single-span
+ messageIllegalArgumentException
if the input isn't a v1 json or thrift single-span
+ messageIllegalArgumentException
if the input isn't a json, proto3 or thrift list
+ message.annotations()
int
compareTo(Annotation that)
timestamp
, then value
.handleError(Call.ErrorHandler<V> errorHandler)
final <R> Call<R>
flatMap(Call.FlatMapper<V,R> flatMapper)
flatMapper
function.final <R> Call<R>
map(Call.Mapper<V,R> mapper)
mapper
function.final class
create(boolean strictTraceId)
static Call.Mapper<List<Span>,List<Span>>
filterSpans(String traceId)
filterTraces(Iterable<String> traceIds)
filterTraces(QueryRequest request)
clone()
static <V> Call<V>
create(V v)
emptyList()
final <R> Call<R>
flatMap(Call.FlatMapper<V,R> flatMapper)
flatMapper
function.handleError(Call.ErrorHandler<V> errorHandler)
final <R> Call<R>
map(Call.Mapper<V,R> mapper)
mapper
function.getDependencies(long endTs,
+ long lookback)
getDependencies(long endTs,
+ long lookback)
getKeys()
AutocompleteTags.getValues(String)
.getKeys()
getRemoteServiceNames(String service)
getRemoteServiceNames(String serviceName)
getServiceNames()
getServiceNames()
local
service names
,
+ sorted lexicographically.getServiceNames()
getSpanNames(String service)
getSpanNames(String serviceName)
span names
recorded by a service
, sorted lexicographically.getSpanNames(String serviceName)
getTraces(QueryRequest request)
getTraces(QueryRequest request)
protected abstract void
final void
abstract void
callback
when complete.void
onErrorReturn(Throwable error,
+ Callback<V> callback)
check()
static CheckResult
class
final class
class
callCount(long callCount)
errorCount(long errorCount)
static DependencyLink.Builder
newBuilder()
toBuilder()
getDependencies()
getDependencies(long endTs,
+ long lookback)
getDependencies(long endTs,
+ long lookback)
parseIp(String)
ip(InetAddress addr)
parseIp(InetAddress)
static Endpoint.Builder
newBuilder()
port(int port)
Endpoint.portAsInt()
serviceName(String serviceName)
Endpoint.serviceName
toBuilder()
build()
localEndpoint()
localEndpoint()
remoteEndpoint()
localEndpoint(Endpoint localEndpoint)
Span.localEndpoint
remoteEndpoint(Endpoint remoteEndpoint)
Span.remoteEndpoint
endpoint()
endpoint()
V1BinaryAnnotation.stringValue()
is present, this is the same as the Span.localEndpoint()
+ Otherwise, it is the same as the Span.remoteEndpoint()
.addAnnotation(long timestamp,
+ String value,
+ Endpoint endpoint)
V1Span.annotations()
addBinaryAnnotation(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.addBinaryAnnotation(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
static V1Annotation
static V1BinaryAnnotation
createAddress(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
static V1BinaryAnnotation
createString(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.addAnnotation(long timestamp,
+ String value)
Span.annotations
clear()
clearAnnotations()
Span.annotations
clearTags()
Span.tags
clone()
debug(boolean debug)
Span.debug()
Span.debug()
duration(long duration)
Span.duration()
id(long id)
Span.id()
or throws IllegalArgumentException if the
+ input is zero.Span.id()
or throws IllegalArgumentException
if not lower-hex format.Span.kind
localEndpoint(Endpoint localEndpoint)
Span.localEndpoint
Span.name
static Span.Builder
newBuilder()
parentId(long parentId)
Span.parentId()
or unsets if the input is zero.Span.parentId()
or throws IllegalArgumentException
if not lower-hex
+ format.Span.tags
remoteEndpoint(Endpoint remoteEndpoint)
Span.remoteEndpoint
shared(boolean shared)
Span.shared()
Span.shared()
timestamp(long timestamp)
Span.timestamp()
toBuilder()
traceId(long high,
+ long low)
Span.id()
or throws IllegalArgumentException
if not lower-hex format.kind()
kind()
Span.remoteEndpoint
static Span.Kind
static Span.Kind[]
values()
Span.kind
static BytesDecoder<Span>
decoderForListMessage(byte[] spans)
IllegalArgumentException
if the input isn't a json, proto3 or thrift list
+ message.static BytesDecoder<Span>
decoderForListMessage(ByteBuffer spans)
static BytesDecoder<Span>
decoderForMessage(byte[] span)
IllegalArgumentException
if the input isn't a v1 json or thrift single-span
+ messageabstract Span
decodeOne(ByteBuffer span)
BytesDecoder.decodeOne(byte[])
decodeList(ByteBuffer spans)
BytesDecoder.decodeList(byte[])
.abstract boolean
decodeList(ByteBuffer spans,
+ Collection<Span> out)
BytesDecoder.decodeList(byte[])
.abstract int
encodeList(List<Span> spans,
+ byte[] out,
+ int pos)
create(boolean strictTraceId)
create(boolean strictTraceId)
static Call.Mapper<List<Span>,List<Span>>
filterSpans(String traceId)
static Call.Mapper<List<Span>,List<Span>>
filterSpans(String traceId)
filterTraces(Iterable<String> traceIds)
filterTraces(Iterable<String> traceIds)
filterTraces(QueryRequest request)
filterTraces(QueryRequest request)
getTraces()
getTraces(QueryRequest request)
getTraces(QueryRequest request)
boolean
void
convert(V1Span source,
+ Collection<Span> sink)
T
- type of the object to deserializeDependencyLinkBytesDecoder
, SpanBytesDecoder
+ ArrayList<Span> out = new ArrayList<>();
+ SpanBytesDecoder.JSON_V2.decodeList(spans, out)
+
boolean
decode(byte[] serialized,
+ Collection<T> out)
list
.decodeList(byte[] serialized)
decodeList(byte[], Collection)
boolean
decodeList(byte[] serialized,
+ Collection<T> out)
true
if an element was decoded or throws IllegalArgumentException
.decodeOne(byte[] serialized)
encoding()
list
.
+
+ Note: multiple elements can be consumed from a single serialized object. For example, if the + input is Zipkin v1, the list might receive two elements if the serialized object was a shared + span.
serialized
- a single message, for example a json objecttrue
if an element was decoded or throws IllegalArgumentException
.decodeList(byte[], Collection)
T
- type of the object to encodeDependencyLinkBytesEncoder
, SpanBytesEncoder
byte[]
byte[]
encodeList(List<T> input)
encoding()
int
sizeInBytes(T input)
Serializable
, Comparable<DependencyLinkBytesDecoder>
, BytesDecoder<DependencyLink>
static DependencyLinkBytesDecoder
static DependencyLinkBytesDecoder[]
values()
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
decode, decodeList, decodeList, decodeOne, encoding
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullSerializable
, Comparable<DependencyLinkBytesEncoder>
, BytesEncoder<DependencyLink>
static DependencyLinkBytesEncoder
static DependencyLinkBytesEncoder[]
values()
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
encode, encodeList, encoding, sizeInBytes
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullSerializable
, Comparable<Encoding>
abstract int
listSizeInBytes(int encodedSizeInBytes)
listSizeInBytes(List)
, except for a single element.abstract int
listSizeInBytes(List<byte[]> values)
static Encoding
static Encoding[]
values()
The message's binary data includes a list header followed by N spans serialized in + TBinaryProtocol
See https://developers.google.com/protocol-buffers/docs/encoding#optional
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nulllistSizeInBytes(List)
, except for a single element.Serializable
, Comparable<SpanBytesDecoder>
, BytesDecoder<Span>
SpanBytesEncoder
, as it isn't needed for instrumentationdecodeList(ByteBuffer spans)
BytesDecoder.decodeList(byte[])
.abstract boolean
decodeList(ByteBuffer spans,
+ Collection<Span> out)
BytesDecoder.decodeList(byte[])
.abstract Span
decodeOne(ByteBuffer span)
BytesDecoder.decodeOne(byte[])
static SpanBytesDecoder
static SpanBytesDecoder[]
values()
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
decode, decodeList, decodeList, decodeOne, encoding
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullBytesDecoder.decodeList(byte[])
.
+
+ Note: only use this when it is ok to modify the underlying ByteBuffer.array()
.
BytesDecoder.decodeList(byte[])
.
+
+ Note: only use this when it is ok to modify the underlying ByteBuffer.array()
.
BytesDecoder.decodeOne(byte[])
+
+ Note: only use this when it is ok to modify the underlying ByteBuffer.array()
.
Serializable
, Comparable<SpanBytesEncoder>
, BytesEncoder<Span>
abstract int
encodeList(List<Span> spans,
+ byte[] out,
+ int pos)
static SpanBytesEncoder
static SpanBytesEncoder[]
values()
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
encode, encodeList, encoding, sizeInBytes
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullstatic BytesDecoder<Span>
decoderForListMessage(byte[] spans)
IllegalArgumentException
if the input isn't a json, proto3 or thrift list
+ message.static BytesDecoder<Span>
decoderForListMessage(ByteBuffer spans)
static BytesDecoder<Span>
decoderForMessage(byte[] span)
IllegalArgumentException
if the input isn't a v1 json or thrift single-span
+ messageenum
enum
SpanBytesEncoder
, as it isn't needed for instrumentationenum
enum
static DependencyLinkBytesDecoder
static DependencyLinkBytesDecoder[]
values()
static DependencyLinkBytesEncoder
static DependencyLinkBytesEncoder[]
values()
encoding()
encoding()
static Encoding
static Encoding[]
values()
static SpanBytesDecoder
static SpanBytesDecoder[]
values()
static SpanBytesEncoder
static SpanBytesEncoder[]
values()
SpanBytesEncoder
, as it isn't needed for instrumentationSpanBytesEncoder
, as it isn't needed for instrumentationsynchronously
or asynchronously
.synchronously
or asynchronously
.synchronously
or asynchronously
.InMemoryStorage
SpanConsumer
.getValues(String)
.IllegalArgumentException
- if the input is empty.Closeable
, AutoCloseable
Extending this is better than extending StorageComponent
directly because it reduces
+ risk of accidentally masking new methods. For example, if you extended storage component and
+ later a new feature for cache control was added, that feature would be blocked until the wrapper
+ was re-compiled. Such would be worse in most cases than not having decoration on new methods.
StorageComponent.Builder
protected
check()
void
close()
protected abstract StorageComponent
delegate()
boolean
toString()
traces()
spanConsumer
in class StorageComponent
traces
in class StorageComponent
spanStore
in class StorageComponent
autocompleteTags
in class StorageComponent
serviceAndSpanNames
in class StorageComponent
Component
Implementations should initialize the component if necessary. It should test a remote + connection, or consult a trusted source to derive the result. They should use least resources + possible to establish a meaningful result, and be safe to call many times, even concurrently.
StorageComponent
Callers of this method will submit an exception raised by Call.execute()
or on the
+ error callback of Call.enqueue(Callback)
.
+
+
By default, this returns true if the input is a RejectedExecutionException
. When
+ originating exceptions, use this type to indicate a load related failure.
+
+
It is generally preferred to specialize this method to handle relevant exceptions for the
+ particular storage rather than wrapping them in RejectedExecutionException
at call
+ sites. Extra wrapping can make errors harder to read, for example, by making it harder to
+ "google" a solution for a well known error message for the storage client, instead thinking the
+ error is in Zipkin code itself.
+
+
While implementation is flexible, one known use is Netflix + concurrency limits
isOverCapacity
in class StorageComponent
Component
For example, if this created a connection, it would close it. If it was provided one, this + would close any sessions, but leave the connection open.
close
in interface AutoCloseable
close
in interface Closeable
close
in class Component
IOException
SpanStore.getTraces(QueryRequest)
.autocompleteKeys(List<String> autocompleteKeys)
build()
maxSpanCount(int maxSpanCount)
searchEnabled(boolean searchEnabled)
StorageComponent.traces()
+ supported.strictTraceId(boolean strictTraceId)
autocompleteCardinality, autocompleteTtl
StorageComponent.Builder
Zipkin historically had 64-bit trace IDs
, but it now supports 128-
+ bit trace IDs via 32-character hex representation. While instrumentation update to propagate
+ 128-bit IDs, it can be ambiguous whether a 64-bit trace ID was sent intentionally, or as an
+ accident of truncation. This setting allows Zipkin to be usable until application
+ instrumentation are upgraded to support 128-bit trace IDs.
+
+
Here are a few trace IDs the help explain this setting. + +
In the above example, Trace ID A and Trace ID B might mean they are in the same trace,
+ since the lower-64 bits of the IDs are the same. This could happen if a server A created the
+ trace and propagated it to server B which ran an older tracing library. Server B could have
+ truncated the trace ID to lower-64 bits. When strictTraceId == false
, spans matching
+ either trace ID A or B would be returned in the same trace when searching by ID A or B. Spans
+ with trace ID C or D wouldn't be when searching by ID A or B because trace IDs C and D don't
+ share lower 64-bits (right-most 16 characters) with trace IDs A or B.
+
+
It is also possible that all servers are capable of handling 128-bit trace identifiers,
+ but are configured to only send 64-bit ones. In this case, if strictTraceId == false
+ trace ID A and B would clash and be put into the same trace, causing confusion. Moreover,
+ there is overhead associated with indexing spans both by 64 and 128-bit trace IDs. When a
+ site has finished upgrading to 128-bit trace IDs, they should enable this setting.
+
+
See https://github.com/openzipkin/b3-propagation/issues/6 for the status of + known open source libraries on 128-bit trace identifiers.
strictTraceId
in class StorageComponent.Builder
StorageComponent.Builder
StorageComponent.traces()
+ supported. For example, query requests will be disabled.
+ + The use case is typically to support 100% sampled data, or when traces are searched using + alternative means such as a logging index. + +
Refer to implementation docs for the impact of this parameter. Operations that use + indexes should return empty as opposed to throwing an exception.
searchEnabled
in class StorageComponent.Builder
StorageComponent.Builder
span tags
. Good
+ choices for autocomplete are limited in cardinality for the same reasons as service and span
+ names.
+ + For example, "http.url" would be a bad choice for autocomplete, not just because it isn't + site-specific (such as environment would be), but also as there are unlimited getValues due + to factors such as unique ids in the path.
autocompleteKeys
in class StorageComponent.Builder
autocompleteKeys
- controls the span values stored for auto-complete.build
in class StorageComponent.Builder
Closeable
, AutoCloseable
, AutocompleteTags
, ServiceAndSpanNames
, SpanConsumer
, SpanStore
, Traces
Internally, spans are indexed on 64-bit trace ID + +
Here's an example of some traces in memory: + +
+ spansByTraceIdTimeStamp:
+ <aaaa,July 4> --> ( spanA(time:July 4, traceId:aaaa, service:foo, name:GET),
+ spanB(time:July 4, traceId:aaaa, service:bar, name:GET) )
+ <cccc,July 4> --> ( spanC(time:July 4, traceId:aaaa, service:foo, name:GET) )
+ <bbbb,July 5> --> ( spanD(time:July 5, traceId:bbbb, service:biz, name:GET) )
+ <bbbb,July 6> --> ( spanE(time:July 6, traceId:bbbb) service:foo, name:POST )
+
+ traceIdToTraceIdTimeStamps:
+ aaaa --> [ <aaaa,July 4> ]
+ bbbb --> [ <bbbb,July 5>, <bbbb,July 6> ]
+ cccc --> [ <cccc,July 4> ]
+
+ serviceToTraceIds:
+ foo --> [ <aaaa>, <cccc>, <bbbb> ]
+ bar --> [ <aaaa> ]
+ biz --> [ <bbbb> ]
+
+ serviceToSpanNames:
+ bar --> ( GET )
+ biz --> ( GET )
+ foo --> ( GET, POST )
+
int
void
clear()
void
close()
getDependencies(long endTs,
+ long lookback)
getKeys()
AutocompleteTags.getValues(String)
.getRemoteServiceNames(String service)
getSpanNames(String service)
span names
recorded by a service
, sorted lexicographically.getTraces(QueryRequest request)
static InMemoryStorage.Builder
toString()
traces()
isOverCapacity
accept
in interface SpanConsumer
SpanStore
When strict trace ID is disabled, spans are grouped by the right-most 16 characters of the + trace ID.
SpanStore
When strict trace ID is disabled, spans with the same right-most 16 characters are returned + even if the characters to the left are not. + +
Implementations should use Span.normalizeTraceId(String)
to ensure consistency.
Traces
When strict trace ID is disabled, spans with the same right-most 16 characters are returned + even if the characters to the left are not. + +
Implementations should use Span.normalizeTraceId(String)
on each input trace ID to
+ ensure consistency.
SpanStore
getServiceNames
in interface ServiceAndSpanNames
getServiceNames
in interface SpanStore
ServiceAndSpanNames
getRemoteServiceNames
in interface ServiceAndSpanNames
SpanStore
span names
recorded by a service
, sorted lexicographically.getSpanNames
in interface ServiceAndSpanNames
getSpanNames
in interface SpanStore
SpanStore
Implementations may bucket aggregated data, for example daily. When this is the case, endTs + may be floored to align with that bucket, for example midnight if daily. lookback applies to + the original endTs, even when bucketed. Using the daily example, if endTs was 11pm and lookback + was 25 hours, the implementation would query against 2 buckets. + +
Some implementations parse spans from storage and call DependencyLinker
to aggregate links. The reason is certain graph logic, such as skipping up
+ the tree is difficult to implement as a storage query.
+
+
Spans are grouped by the right-most 16 characters of the trace ID. This ensures call counts + are not incremented twice due to one hop downgrading from 128 to 64-bit trace IDs.
getDependencies
in interface SpanStore
endTs
- only return links from spans where Span.timestamp()
are at or before this
+ time in epoch milliseconds.lookback
- only return links from spans where Span.timestamp()
are at or after
+ (endTs - lookback) in milliseconds.AutocompleteTags
AutocompleteTags.getValues(String)
.getKeys
in interface AutocompleteTags
AutocompleteTags
getValues
in interface AutocompleteTags
traces
in class StorageComponent
spanStore
in class StorageComponent
autocompleteTags
in class StorageComponent
serviceAndSpanNames
in class StorageComponent
spanConsumer
in class StorageComponent
Component
For example, if this created a connection, it would close it. If it was provided one, this + would close any sessions, but leave the connection open.
annotationQuery(Map<String,String> annotationQuery)
build()
endTs(long endTs)
QueryRequest.endTs()
limit(int limit)
QueryRequest.limit()
lookback(long lookback)
maxDuration(Long maxDuration)
minDuration(Long minDuration)
parseAnnotationQuery(String annotationQuery)
remoteServiceName(String remoteServiceName)
serviceName(String serviceName)
QueryRequest.endTs()
QueryRequest.limit()
Results should be filtered against endTs
, subject to limit
and lookback
. For example, if endTs is 10:20 today, limit is 10, and lookback is 7 days, traces
+ returned should be those nearest to 10:20 today, not 10:20 a week ago.
+
+
Time units of endTs
and lookback
are milliseconds as opposed to
+ microseconds, the grain of Span.timestamp()
. Milliseconds is a more familiar and
+ supported granularity for query, index and windowing functions.
Span.annotations()
+ include a value in this set, or where Span.tags()
include a key is in this set.long
endTs()
Span.timestamp()
are at or before this time in epoch
+ milliseconds.int
limit()
long
lookback()
Span.timestamp()
are at or after (endTs - lookback) in
+ milliseconds.Span.duration()
is less than or equal to maxDuration
+ microseconds.Span.duration()
is greater than or equal to minDuration
+ microseconds.static QueryRequest.Builder
remote service
+ name
.local service name
and
+ constrains all other parameters.spanName()
Span.name()
boolean
toString()
local service name
and
+ constrains all other parameters.remote service
+ name
.Span.name()
Span.annotations()
+ include a value in this set, or where Span.tags()
include a key is in this set. When
+ not, include traces whose Span.tags()
an entry in this map.
+
+ Multiple entries are combined with AND, and AND against other conditions.
Span.duration()
is greater than or equal to minDuration
+ microseconds.Span.duration()
is less than or equal to maxDuration
+ microseconds. Only valid with minDuration
.Span.timestamp()
are at or before this time in epoch
+ milliseconds. Defaults to current time.Span.timestamp()
are at or after (endTs - lookback) in
+ milliseconds. Defaults to endTs.This is used when the backend cannot fully refine a trace query.
InMemoryStorage
SpanConsumer
.getRemoteServiceNames(String serviceName)
local
service names
,
+ sorted lexicographically.getSpanNames(String serviceName)
span names
recorded by a service
, sorted lexicographically.local
service names
,
+ sorted lexicographically.span names
recorded by a service
, sorted lexicographically.InMemoryStorage
InMemoryStorage
SpanConsumer
.
+
+ Note: This is not considered a user-level Api, rather an Spi that can be used to bind + user-level abstractions such as futures or observables.
getDependencies(long endTs,
+ long lookback)
getSpanNames(String serviceName)
getTraces(QueryRequest request)
When strict trace ID is disabled, spans are grouped by the right-most 16 characters of the + trace ID.
When strict trace ID is disabled, spans with the same right-most 16 characters are returned + even if the characters to the left are not. + +
Implementations should use Span.normalizeTraceId(String)
to ensure consistency.
traceId
- the trace ID
span names
recorded by a service
, sorted lexicographically.Implementations may bucket aggregated data, for example daily. When this is the case, endTs + may be floored to align with that bucket, for example midnight if daily. lookback applies to + the original endTs, even when bucketed. Using the daily example, if endTs was 11pm and lookback + was 25 hours, the implementation would query against 2 buckets. + +
Some implementations parse spans from storage and call DependencyLinker
to aggregate links. The reason is certain graph logic, such as skipping up
+ the tree is difficult to implement as a storage query.
+
+
Spans are grouped by the right-most 16 characters of the trace ID. This ensures call counts + are not incremented twice due to one hop downgrading from 128 to 64-bit trace IDs.
endTs
- only return links from spans where Span.timestamp()
are at or before this
+ time in epoch milliseconds.lookback
- only return links from spans where Span.timestamp()
are at or after
+ (endTs - lookback) in milliseconds.InMemoryStorage.Builder
autocompleteCardinality(int autocompleteCardinality)
autocompleteKeys(List<String> keys)
autocompleteTtl(int autocompleteTtl)
abstract StorageComponent
build()
abstract StorageComponent.Builder
searchEnabled(boolean searchEnabled)
StorageComponent.traces()
+ supported.abstract StorageComponent.Builder
strictTraceId(boolean strictTraceId)
Zipkin historically had 64-bit trace IDs
, but it now supports 128-
+ bit trace IDs via 32-character hex representation. While instrumentation update to propagate
+ 128-bit IDs, it can be ambiguous whether a 64-bit trace ID was sent intentionally, or as an
+ accident of truncation. This setting allows Zipkin to be usable until application
+ instrumentation are upgraded to support 128-bit trace IDs.
+
+
Here are a few trace IDs the help explain this setting. + +
In the above example, Trace ID A and Trace ID B might mean they are in the same trace,
+ since the lower-64 bits of the IDs are the same. This could happen if a server A created the
+ trace and propagated it to server B which ran an older tracing library. Server B could have
+ truncated the trace ID to lower-64 bits. When strictTraceId == false
, spans matching
+ either trace ID A or B would be returned in the same trace when searching by ID A or B. Spans
+ with trace ID C or D wouldn't be when searching by ID A or B because trace IDs C and D don't
+ share lower 64-bits (right-most 16 characters) with trace IDs A or B.
+
+
It is also possible that all servers are capable of handling 128-bit trace identifiers,
+ but are configured to only send 64-bit ones. In this case, if strictTraceId == false
+ trace ID A and B would clash and be put into the same trace, causing confusion. Moreover,
+ there is overhead associated with indexing spans both by 64 and 128-bit trace IDs. When a
+ site has finished upgrading to 128-bit trace IDs, they should enable this setting.
+
+
See https://github.com/openzipkin/b3-propagation/issues/6 for the status of + known open source libraries on 128-bit trace identifiers.
StorageComponent.traces()
+ supported. For example, query requests will be disabled.
+ + The use case is typically to support 100% sampled data, or when traces are searched using + alternative means such as a logging index. + +
Refer to implementation docs for the impact of this parameter. Operations that use + indexes should return empty as opposed to throwing an exception.
span tags
. Good
+ choices for autocomplete are limited in cardinality for the same reasons as service and span
+ names.
+ + For example, "http.url" would be a bad choice for autocomplete, not just because it isn't + site-specific (such as environment would be), but also as there are unlimited getValues due + to factors such as unique ids in the path.
keys
- controls the span values stored for auto-complete.Closeable
, AutoCloseable
ForwardingStorageComponent
, InMemoryStorage
boolean
abstract SpanConsumer
abstract SpanStore
traces()
Callers of this method will submit an exception raised by Call.execute()
or on the
+ error callback of Call.enqueue(Callback)
.
+
+
By default, this returns true if the input is a RejectedExecutionException
. When
+ originating exceptions, use this type to indicate a load related failure.
+
+
It is generally preferred to specialize this method to handle relevant exceptions for the
+ particular storage rather than wrapping them in RejectedExecutionException
at call
+ sites. Extra wrapping can make errors harder to read, for example, by making it harder to
+ "google" a solution for a well known error message for the storage client, instead thinking the
+ error is in Zipkin code itself.
+
+
While implementation is flexible, one known use is Netflix + concurrency limits
strict trace ID
is disabled.static Call.Mapper<List<Span>,List<Span>>
filterSpans(String traceId)
filterTraces(Iterable<String> traceIds)
filterTraces(QueryRequest request)
FilterTraces
Make sure the input IDs are unique and normalized
.
InMemoryStorage
SpanConsumer
.
+
+ Specifically, this provides apis present when search is disabled
.
+
+
Note: This is not considered a user-level Api, rather an Spi that can be used to bind + user-level abstractions such as futures or observables.
When strict trace ID is disabled, spans with the same right-most 16 characters are returned + even if the characters to the left are not. + +
Implementations should use Span.normalizeTraceId(String)
to ensure consistency.
traceId
- the trace ID
When strict trace ID is disabled, spans with the same right-most 16 characters are returned + even if the characters to the left are not. + +
Implementations should use Span.normalizeTraceId(String)
on each input trace ID to
+ ensure consistency.
traceIds
- a list of unique trace IDs
.final class
autocompleteTags()
autocompleteTags()
autocompleteKeys(List<String> autocompleteKeys)
maxSpanCount(int maxSpanCount)
static InMemoryStorage.Builder
newBuilder()
searchEnabled(boolean searchEnabled)
strictTraceId(boolean strictTraceId)
autocompleteTags()
build()
serviceAndSpanNames()
spanStore()
traces()
annotationQuery(Map<String,String> annotationQuery)
endTs(long endTs)
QueryRequest.endTs()
limit(int limit)
QueryRequest.limit()
lookback(long lookback)
maxDuration(Long maxDuration)
minDuration(Long minDuration)
static QueryRequest.Builder
newBuilder()
parseAnnotationQuery(String annotationQuery)
remoteServiceName(String remoteServiceName)
serviceName(String serviceName)
toBuilder()
filterTraces(QueryRequest request)
getTraces(QueryRequest request)
getTraces(QueryRequest request)
final class
serviceAndSpanNames()
serviceAndSpanNames()
final class
spanConsumer()
spanConsumer()
abstract SpanConsumer
spanConsumer()
final class
autocompleteCardinality(int autocompleteCardinality)
autocompleteKeys(List<String> keys)
autocompleteTtl(int autocompleteTtl)
abstract StorageComponent.Builder
searchEnabled(boolean searchEnabled)
StorageComponent.traces()
+ supported.abstract StorageComponent.Builder
strictTraceId(boolean strictTraceId)
class
final class
abstract StorageComponent
build()
protected abstract StorageComponent
delegate()
final class
SpanConsumer
.SpanConsumer
.SpanConsumer
.strict trace ID
is disabled.SpanConsumer
.SpanConsumer
.SpanConsumer
.SpanConsumer
.SpanConsumer
.Comparable<V1Annotation>
Annotation
.Annotation
, except in v1 format the Span.localEndpoint()
was
+ repeated for each annotation.int
compareTo(V1Annotation that)
timestamp()
, then value()
.static V1Annotation
endpoint()
boolean
int
hashCode()
long
value()
Annotation.value()
Annotation.value()
In v2 format, this is analogous to Span.localEndpoint()
.
timestamp()
, then value()
.compareTo
in interface Comparable<V1Annotation>
Comparable<V1BinaryAnnotation>
Span.tags()
.v2 span
data. Namely, this
+ supports Span.tags()
, Span.localEndpoint()
and Span.remoteEndpoint()
.
+
+ Specifically, this maps String and Boolean binary annotations, ignoring others.
static final int
static final int
int
compareTo(V1BinaryAnnotation that)
key
static V1BinaryAnnotation
createAddress(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
static V1BinaryAnnotation
createString(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.endpoint()
stringValue()
is present, this is the same as the Span.localEndpoint()
+ Otherwise, it is the same as the Span.remoteEndpoint()
.boolean
int
hashCode()
key()
Span.tags()
v2 span tag}Span.tags()
v2 span tag} or null if this is an addressint
type()
Span.remoteEndpoint()
Span.tags()
except duplicating the
+ endpoint.
+
+ A special case is when the key is "lc" and value is empty: This substitutes for the Span.localEndpoint()
.
Span.tags()
v2 span tag}Span.tags()
v2 span tag} or null if this is an addressstringValue()
is present, this is the same as the Span.localEndpoint()
+ Otherwise, it is the same as the Span.remoteEndpoint()
.key
compareTo
in interface Comparable<V1BinaryAnnotation>
addAnnotation(long timestamp,
+ String value,
+ Endpoint endpoint)
V1Span.annotations()
addBinaryAnnotation(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.addBinaryAnnotation(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
build()
clear()
V1Span.debug()
duration(long duration)
V1Span.duration()
long
id()
V1Span.id()
id(long id)
V1Span.id()
Span.Builder.id(String)
V1Span.name()
parentId(long parentId)
V1Span.parentId()
Span.Builder.parentId(String)
timestamp(long timestamp)
V1Span.timestamp()
long
traceId()
V1Span.traceId()
traceId(long traceId)
V1Span.traceId()
Span.Builder.traceId(String)
long
V1Span.traceIdHigh()
traceIdHigh(long traceIdHigh)
V1Span.traceIdHigh()
V1Span.traceIdHigh()
V1Span.traceId()
V1Span.id()
Span.Builder.traceId(String)
V1Span.traceId()
V1Span.traceIdHigh()
V1Span.id()
Span.Builder.id(String)
Span.Builder.parentId(String)
V1Span.parentId()
V1Span.name()
V1Span.timestamp()
V1Span.duration()
V1Span.annotations()
Span.remoteEndpoint()
Span.tags()
except duplicating the
+ endpoint.
+
+ A key of "lc" and empty value substitutes for Span.localEndpoint()
.
V1Span.debug()
Span
.Span.annotations()
, except each may be associated with Span.localEndpoint()
Span.tags()
are allocated to binary annotations with a V1BinaryAnnotation.stringValue()
.debug()
Span.debug()
long
duration()
Span.durationAsLong()
boolean
int
hashCode()
long
id()
Span.id()
except packed into a long.name()
Span.name()
static V1Span.Builder
long
parentId()
id()
or zero if this the root span in a trace.long
Span.timestampAsLong()
long
traceId()
Span.traceId()
long
Span.traceId()
Span.id()
except packed into a long. Zero means root span.Span.name()
id()
or zero if this the root span in a trace.Span.timestampAsLong()
Span.durationAsLong()
Span.annotations()
, except each may be associated with Span.localEndpoint()
Span.tags()
are allocated to binary annotations with a V1BinaryAnnotation.stringValue()
. Span.remoteEndpoint()
to those without.Span.debug()
This type isn't thread-safe: it re-uses state to avoid re-allocations in conversion loops.
void
convert(V1Span source,
+ Collection<Span> sink)
static V1SpanConverter
create()
This type isn't thread-safe: it re-uses state to avoid re-allocations in conversion loops.
annotations()
Span.annotations()
, except each may be associated with Span.localEndpoint()
int
compareTo(V1Annotation that)
timestamp()
, then value()
.static V1BinaryAnnotation
createAddress(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
static V1BinaryAnnotation
createString(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.binaryAnnotations()
Span.tags()
are allocated to binary annotations with a stringValue()
.int
compareTo(V1BinaryAnnotation that)
key
addAnnotation(long timestamp,
+ String value,
+ Endpoint endpoint)
V1Span.annotations()
addBinaryAnnotation(String key,
+ String value,
+ Endpoint endpoint)
Span.tags()
except duplicating the
+ endpoint.addBinaryAnnotation(String address,
+ Endpoint endpoint)
Span.remoteEndpoint()
clear()
V1Span.debug()
duration(long duration)
V1Span.duration()
id(long id)
V1Span.id()
Span.Builder.id(String)
V1Span.name()
static V1Span.Builder
newBuilder()
parentId(long parentId)
V1Span.parentId()
Span.Builder.parentId(String)
timestamp(long timestamp)
V1Span.timestamp()
traceId(long traceId)
V1Span.traceId()
Span.Builder.traceId(String)
traceIdHigh(long traceIdHigh)
V1Span.traceIdHigh()
Annotation
.Span.tags()
.Span
.Annotation
.Span.tags()
.Span
.
Annotation
.