Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Clean up line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
bhs committed Jul 28, 2016
1 parent 2e8403b commit 485107a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 20 deletions.
12 changes: 6 additions & 6 deletions opentracing-api/src/main/java/io/opentracing/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ 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.
**/
Span log(String eventName, /* @Nullable */ Object payload);

/**
* 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.
Expand Down
11 changes: 8 additions & 3 deletions opentracing-api/src/main/java/io/opentracing/SpanContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <trace_id, span_id, sampled> 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 <trace_id, span_id, sampled>
* 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
*/
Expand Down
12 changes: 8 additions & 4 deletions opentracing-api/src/main/java/io/opentracing/Tracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ public interface Tracer {
* tracer.buildSpan('...').withChildOf(spanCtx).start();
* }</pre>
*
* 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 <C> 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
Expand All @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
*
Expand All @@ -35,7 +36,8 @@
public interface Format<C> {
class Builtin<C> implements Format<C> {
/**
* 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.
*
Expand All @@ -47,9 +49,11 @@ class Builtin<C> implements Format<C> {
public final static Format<TextMap> 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)
Expand All @@ -59,7 +63,8 @@ class Builtin<C> implements Format<C> {
public final static Format<TextMap> 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 485107a

Please sign in to comment.