Move defined tracing types to subpackage data
This commit is contained in:
		
							parent
							
								
									365881a428
								
							
						
					
					
						commit
						ec4318a10d
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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}. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
package openconsensus.trace.data;
 | 
			
		||||
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
package openconsensus.trace.data;
 | 
			
		||||
 | 
			
		||||
import java.util.Random;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
 * limitations under the License.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
package openconsensus.trace.data;
 | 
			
		||||
 | 
			
		||||
import java.util.Random;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue