Move defined tracing types to subpackage data

This commit is contained in:
Bogdan Drutu 2019-03-26 16:31:04 -07:00
parent 365881a428
commit ec4318a10d
22 changed files with 41 additions and 17 deletions

View File

@ -16,7 +16,7 @@
package openconsensus.common;
import openconsensus.trace.AttributeValue;
import openconsensus.trace.data.AttributeValue;
/**
* Used to specify matching functions for use encoding tagged unions (i.e. sum types) in Java. See

View File

@ -19,6 +19,11 @@ package openconsensus.trace;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
import openconsensus.internal.Utils;
import openconsensus.trace.data.Annotation;
import openconsensus.trace.data.AttributeValue;
import openconsensus.trace.data.Link;
import openconsensus.trace.data.MessageEvent;
import openconsensus.trace.data.Status;
/**
* The {@code BlankSpan} is a singleton class, which is the default {@link Span} that is used when

View File

@ -20,6 +20,7 @@ import io.grpc.Context;
import java.util.concurrent.Callable;
import javax.annotation.Nullable;
import openconsensus.common.Scope;
import openconsensus.trace.data.Status;
import openconsensus.trace.unsafe.ContextUtils;
/** Util methods/functionality to interact with the {@link Span} in the {@link io.grpc.Context}. */

View File

@ -19,6 +19,7 @@ package openconsensus.trace;
import com.google.auto.value.AutoValue;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import openconsensus.trace.data.Status;
/**
* A class that enables overriding the default values used when ending a {@link Span}. Allows

View File

@ -18,6 +18,8 @@ package openconsensus.trace;
import java.util.List;
import javax.annotation.Nullable;
import openconsensus.trace.data.SpanId;
import openconsensus.trace.data.TraceId;
/**
* Sampler is used to make decisions on {@link Span} sampling.

View File

@ -22,6 +22,11 @@ import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import openconsensus.internal.Utils;
import openconsensus.trace.data.Annotation;
import openconsensus.trace.data.AttributeValue;
import openconsensus.trace.data.Link;
import openconsensus.trace.data.MessageEvent;
import openconsensus.trace.data.Status;
/**
* An abstract class that represents a span. It has an associated {@link SpanContext} and a set of

View File

@ -22,6 +22,7 @@ import java.util.concurrent.Callable;
import javax.annotation.Nullable;
import openconsensus.common.Scope;
import openconsensus.internal.Utils;
import openconsensus.trace.data.Status;
/**
* {@link SpanBuilder} is used to construct {@link Span} instances which define arbitrary scopes of

View File

@ -19,6 +19,10 @@ package openconsensus.trace;
import java.util.Arrays;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import openconsensus.trace.data.SpanId;
import openconsensus.trace.data.TraceId;
import openconsensus.trace.data.TraceOptions;
import openconsensus.trace.data.Tracestate;
/**
* A class that represents a span context. A span context contains the state that must propagate to

View File

@ -22,6 +22,7 @@ import javax.annotation.Nullable;
import openconsensus.common.Scope;
import openconsensus.internal.Utils;
import openconsensus.trace.SpanBuilder.NoopSpanBuilder;
import openconsensus.trace.data.Status;
/**
* Tracer is a simple, thin class for {@link Span} creation and in-process context interaction.

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import com.google.auto.value.AutoValue;
import java.util.Collections;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import com.google.auto.value.AutoValue;
import javax.annotation.concurrent.Immutable;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import java.util.Arrays;
import openconsensus.internal.Utils;

View File

@ -14,13 +14,15 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import com.google.auto.value.AutoValue;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.concurrent.Immutable;
import openconsensus.trace.Span;
import openconsensus.trace.SpanContext;
/**
* A link to a {@link Span} from a different trace.

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import com.google.auto.value.AutoValue;
import javax.annotation.concurrent.Immutable;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import java.util.Random;
import javax.annotation.Nullable;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import java.util.ArrayList;
import java.util.Arrays;
@ -24,6 +24,7 @@ import java.util.TreeMap;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import openconsensus.internal.Utils;
import openconsensus.trace.Span;
/*>>>
import org.checkerframework.dataflow.qual.Deterministic;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import java.util.Random;
import javax.annotation.Nullable;

View File

@ -14,13 +14,14 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import java.util.Arrays;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import openconsensus.internal.DefaultVisibilityForTesting;
import openconsensus.internal.Utils;
import openconsensus.trace.Span;
/**
* A class that represents global trace options. These options are propagated to all child {@link

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package openconsensus.trace;
package openconsensus.trace.data;
import com.google.auto.value.AutoValue;
import java.util.ArrayList;

View File

@ -22,8 +22,8 @@ import javax.annotation.concurrent.Immutable;
import openconsensus.trace.Sampler;
import openconsensus.trace.Span;
import openconsensus.trace.SpanContext;
import openconsensus.trace.SpanId;
import openconsensus.trace.TraceId;
import openconsensus.trace.data.SpanId;
import openconsensus.trace.data.TraceId;
/** Sampler that always makes a "yes" decision on {@link Span} sampling. */
@Immutable

View File

@ -22,8 +22,8 @@ import javax.annotation.concurrent.Immutable;
import openconsensus.trace.Sampler;
import openconsensus.trace.Span;
import openconsensus.trace.SpanContext;
import openconsensus.trace.SpanId;
import openconsensus.trace.TraceId;
import openconsensus.trace.data.SpanId;
import openconsensus.trace.data.TraceId;
/** Sampler that always makes a "no" decision on {@link Span} sampling. */
@Immutable

View File

@ -24,8 +24,8 @@ import openconsensus.internal.Utils;
import openconsensus.trace.Sampler;
import openconsensus.trace.Span;
import openconsensus.trace.SpanContext;
import openconsensus.trace.SpanId;
import openconsensus.trace.TraceId;
import openconsensus.trace.data.SpanId;
import openconsensus.trace.data.TraceId;
/**
* We assume the lower 64 bits of the traceId's are randomly distributed around the whole (long)