diff --git a/opentracing/src/main/java/opentracing/Span.java b/opentracing/src/main/java/opentracing/Span.java index 8269a8af..7ed815f2 100644 --- a/opentracing/src/main/java/opentracing/Span.java +++ b/opentracing/src/main/java/opentracing/Span.java @@ -14,9 +14,9 @@ package opentracing; /** - * Span represents an active, un-finished span in the opentracing system. + * Represents an in-flight span in the opentracing system. * - *
Spans are created by the {@link Tracer} interface. + *
Spans are created by the {@link Tracer#buildSpan} interface. */ public interface Span { @@ -31,11 +31,6 @@ public interface Span { /** * Set a key:value tag on the Span. * - *
Tag values can be of arbitrary types, however the treatment of complex types is dependent on - * the underlying tracing system implementation. It is expected that most tracing systems will - * handle primitive types like strings and numbers. If a tracing system cannot understand how to - * handle a particular value type, it may ignore the tag, but shall not panic. - * *
If there is a pre-existing tag set for {@code key}, it is overwritten.
*/
// overloaded 3x to support the BasicType concern
@@ -54,10 +49,13 @@ public interface Span {
*/
Span setBaggageItem(String key, String value);
- /** Get a Baggage item by key. */
+ /** Get a Baggage item by key.
+ *
+ * Returns null if no entry found, or baggage is not supported in the current implementation.
+ */
String getBaggageItem(String key);
- /** *
+ /**
* Add a new log event to the Span, accepting an event name string and an optional structured payload argument.
* If specified, the payload argument may be of any type and arbitrary size,
* though implementations are not required to retain all payload arguments
@@ -76,5 +74,5 @@ public interface Span {
* The timestamp is specified manually here to represent a past log event.
* The timestamp in microseconds in UTC time.
**/
- Span log(long instantMicroseconds, String eventName, /* @Nullable */ Object payload);
+ Span log(long timestampMicroseconds, String eventName, /* @Nullable */ Object payload);
}
diff --git a/opentracing/src/main/java/opentracing/Tracer.java b/opentracing/src/main/java/opentracing/Tracer.java
index 7d66f5a9..94a8c839 100644
--- a/opentracing/src/main/java/opentracing/Tracer.java
+++ b/opentracing/src/main/java/opentracing/Tracer.java
@@ -43,6 +43,10 @@ public interface Tracer {
* a Span instance, and
* a “carrier” object in which to inject that Span for cross-process propagation.
*
+ * A “carrier” object is some sort of http or rpc envelope, for example HeaderGroup (from Apache HttpComponents).
+ *
+ * The low-level format carriers Map<String,String> and ByteBuffer are guaranteed to be supported,
+ * otherwise only carriers that have been registered are supported.
*/