diff --git a/opentracing-api/src/main/java/io/opentracing/Span.java b/opentracing-api/src/main/java/io/opentracing/Span.java index 3dfa5059..2ab7d57e 100644 --- a/opentracing-api/src/main/java/io/opentracing/Span.java +++ b/opentracing-api/src/main/java/io/opentracing/Span.java @@ -50,9 +50,9 @@ public interface Span extends AutoCloseable { /** * 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 - * (or even all parts of all payload arguments). + * + * If specified, the payload argument may be of any type and arbitrary size, though implementations are not + * required to retain all payload arguments (or even all parts of all payload arguments). * * The timestamp of this log event is the current time. **/ @@ -60,9 +60,9 @@ public interface Span extends AutoCloseable { /** * 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 - * (or even all parts of all payload arguments). + * + * If specified, the payload argument may be of any type and arbitrary size, though implementations are not + * required to retain all payload arguments (or even all parts of all payload arguments). * * The timestamp is specified manually here to represent a past log event. * The timestamp in microseconds in UTC time. diff --git a/opentracing-api/src/main/java/io/opentracing/SpanContext.java b/opentracing-api/src/main/java/io/opentracing/SpanContext.java index 31e1d1eb..553403fd 100644 --- a/opentracing-api/src/main/java/io/opentracing/SpanContext.java +++ b/opentracing-api/src/main/java/io/opentracing/SpanContext.java @@ -16,17 +16,22 @@ /** * SpanContext represents Span state that must propagate to descendant Spans and across process boundaries. * - * SpanContext is logically divided into two pieces: (1) the user-level "Baggage" (see set_baggage_item and get_baggage_item) that propagates across Span boundaries and (2) any Tracer-implementation-specific fields that are needed to identify or otherwise contextualize the associated Span instance (e.g., a tuple). + * SpanContext is logically divided into two pieces: (1) the user-level "Baggage" (see set_baggage_item and + * get_baggage_item) that propagates across Span boundaries and (2) any Tracer-implementation-specific fields that are + * needed to identify or otherwise contextualize the associated Span instance (e.g., a + * tuple). */ public interface SpanContext { /** * Sets a baggage item in the SpanContext as a key/value pair. * - * Baggage enables powerful distributed context propagation functionality where arbitrary application data can be carried along the full path of request execution throughout the system. + * Baggage enables powerful distributed context propagation functionality where arbitrary application data can be + * carried along the full path of request execution throughout the system. * * Note 1: Baggage is only propagated to the future (recursive) children of this SpanContext. * - * Note 2: Baggage is sent in-band with every subsequent local and remote calls, so this feature must be used with care. + * Note 2: Baggage is sent in-band with every subsequent local and remote calls, so this feature must be used with + * care. * * @return this SpanContext instance, for chaining */ diff --git a/opentracing-api/src/main/java/io/opentracing/Tracer.java b/opentracing-api/src/main/java/io/opentracing/Tracer.java index 8b026458..fe3d1633 100644 --- a/opentracing-api/src/main/java/io/opentracing/Tracer.java +++ b/opentracing-api/src/main/java/io/opentracing/Tracer.java @@ -71,11 +71,13 @@ public interface Tracer { * tracer.buildSpan('...').withChildOf(spanCtx).start(); * } * - * If the span serialized state is invalid (corrupt, wrong version, etc) inside the carrier this will result in an IllegalArgumentException. + * If the span serialized state is invalid (corrupt, wrong version, etc) inside the carrier this will result in an + * IllegalArgumentException. * * @param the carrier type, which also parametrizes the Format. * @param format the Format of the carrier - * @param carrier the carrier for the SpanContext state. All Tracer.extract() implementations must support io.opentracing.propagation.TextMap and java.nio.ByteBuffer. + * @param carrier the carrier for the SpanContext state. All Tracer.extract() implementations must support + * io.opentracing.propagation.TextMap and java.nio.ByteBuffer. * @returns the SpanContext instance extracted from the carrier * * @see io.opentracing.propagation.Format @@ -97,10 +99,12 @@ interface SpanBuilder { SpanBuilder asChildOf(Span parent); /** - * Add a reference from the Span being built to a distinct (usually parent) Span. May be called multiple times to represent multiple such References. + * Add a reference from the Span being built to a distinct (usually parent) Span. May be called multiple times to + * represent multiple such References. * * @param referenceType the reference type, typically one of the constants defined in References - * @param referencedContext the SpanContext being referenced; e.g., for a References.CHILD_OF referenceType, the referencedContext is the parent + * @param referencedContext the SpanContext being referenced; e.g., for a References.CHILD_OF referenceType, the + * referencedContext is the parent * * @see io.opentracing.References */ diff --git a/opentracing-api/src/main/java/io/opentracing/propagation/Format.java b/opentracing-api/src/main/java/io/opentracing/propagation/Format.java index 36e94236..91da6948 100644 --- a/opentracing-api/src/main/java/io/opentracing/propagation/Format.java +++ b/opentracing-api/src/main/java/io/opentracing/propagation/Format.java @@ -19,7 +19,8 @@ import java.nio.ByteBuffer; /** - * Format instances control the behavior of Tracer.inject and Tracer.extract (and also constrain the type of the carrier parameter to same). + * Format instances control the behavior of Tracer.inject and Tracer.extract (and also constrain the type of the + * carrier parameter to same). * * Most OpenTracing users will only reference the Format.Builtin constants. For example: * @@ -35,7 +36,8 @@ public interface Format { class Builtin implements Format { /** - * The TEXT_MAP format allows for arbitrary String->String map encoding of SpanContext state for Tracer.inject and Tracer.extract. + * The TEXT_MAP format allows for arbitrary String->String map encoding of SpanContext state for Tracer.inject + * and Tracer.extract. * * Unlike HTTP_HEADERS, the builtin TEXT_MAP format expresses no constraints on keys or values. * @@ -47,9 +49,11 @@ class Builtin implements Format { public final static Format TEXT_MAP = new Builtin<>(); /** - * The HTTP_HEADERS format allows for HTTP-header-compatible String->String map encoding of SpanContext state for Tracer.inject and Tracer.extract. + * The HTTP_HEADERS format allows for HTTP-header-compatible String->String map encoding of SpanContext state + * for Tracer.inject and Tracer.extract. * - * I.e., keys written to the TextMap MUST be suitable for HTTP header keys (which are poorly defined but certainly restricted); and similarly for values (i.e., URL-escaped and "not too long"). + * I.e., keys written to the TextMap MUST be suitable for HTTP header keys (which are poorly defined but + * certainly restricted); and similarly for values (i.e., URL-escaped and "not too long"). * * @see io.opentracing.Tracer#inject(SpanContext, Format, Object) * @see io.opentracing.Tracer#extract(Format, Object) @@ -59,7 +63,8 @@ class Builtin implements Format { public final static Format HTTP_HEADERS = new Builtin<>(); /** - * The BINARY format allows for unconstrained binary encoding of SpanContext state for Tracer.inject and Tracer.extract. + * The BINARY format allows for unconstrained binary encoding of SpanContext state for Tracer.inject and + * Tracer.extract. * * @see io.opentracing.Tracer#inject(SpanContext, Format, Object) * @see io.opentracing.Tracer#extract(Format, Object) diff --git a/opentracing-api/src/main/java/io/opentracing/propagation/TextMap.java b/opentracing-api/src/main/java/io/opentracing/propagation/TextMap.java index cde76c27..2e59f829 100644 --- a/opentracing-api/src/main/java/io/opentracing/propagation/TextMap.java +++ b/opentracing-api/src/main/java/io/opentracing/propagation/TextMap.java @@ -19,7 +19,8 @@ import java.util.Map; /** - * TextMap is a built-in carrier for Tracer.inject() and Tracer.extract(). TextMap implementations allows Tracers to read and write key:value String pairs from arbitrary underlying sources of data. + * TextMap is a built-in carrier for Tracer.inject() and Tracer.extract(). TextMap implementations allows Tracers to + * read and write key:value String pairs from arbitrary underlying sources of data. * * @see io.opentracing.Tracer#inject(SpanContext, Format, Object) * @see io.opentracing.Tracer#extract(Format, Object) @@ -28,7 +29,8 @@ public interface TextMap { /** * Gets an iterator over arbitrary key:value pairs from the TextMapReader. * - * @return entries in the TextMap backing store; note that for some Formats, the iterator may include entries that were never injected by a Tracer implementation (e.g., unrelated HTTP headers) + * @return entries in the TextMap backing store; note that for some Formats, the iterator may include entries that + * were never injected by a Tracer implementation (e.g., unrelated HTTP headers) * * @see io.opentracing.Tracer#extract(Format, Object) * @see Format.Builtin#TEXT_MAP