./gradlew goJF
This commit is contained in:
		
							parent
							
								
									9cb3ad5eb7
								
							
						
					
					
						commit
						3bd0e1e522
					
				| 
						 | 
				
			
			@ -23,8 +23,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		|||
import openconsensus.metrics.MetricRegistry;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Represents a function that produces a double-valued result. See {@link
 | 
			
		||||
 * MetricRegistry} for an example of its use.
 | 
			
		||||
 * Represents a function that produces a double-valued result. See {@link MetricRegistry} for an
 | 
			
		||||
 * example of its use.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>Note: This class is based on the java.util.ToDoubleFunction class added in Java 1.8. We cannot
 | 
			
		||||
 * use the Function from Java 1.8 because this library is Java 1.6 compatible.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,8 +23,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		|||
import openconsensus.metrics.MetricRegistry;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Represents a function that produces a long-valued result. See {@link
 | 
			
		||||
 * MetricRegistry} for an example of its use.
 | 
			
		||||
 * Represents a function that produces a long-valued result. See {@link MetricRegistry} for an
 | 
			
		||||
 * example of its use.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>Note: This class is based on the java.util.ToLongFunction class added in Java 1.8. We cannot
 | 
			
		||||
 * use the Function from Java 1.8 because this library is Java 1.6 compatible.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.internal;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Clock;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/** A {@link Clock} that always returns 0. */
 | 
			
		||||
@Immutable
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,4 +23,4 @@
 | 
			
		|||
@Internal
 | 
			
		||||
package openconsensus.internal;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.Internal;
 | 
			
		||||
import openconsensus.common.Internal;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,11 +16,11 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ToDoubleFunction;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.lang.ref.WeakReference;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.common.ToDoubleFunction;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,11 +16,11 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ToLongFunction;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.lang.ref.WeakReference;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.common.ToLongFunction;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Double Gauge metric, to report instantaneous measurement of a double value. Gauges can go both up
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,8 @@
 | 
			
		|||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The key of a {@code Label} associated with a {@code MetricDescriptor}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The value of a {@code Label} associated with a {@code TimeSeries}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Long Gauge metric, to report instantaneous measurement of an int64 value. Gauges can go both up
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,18 +16,17 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.ToDoubleFunction;
 | 
			
		||||
import openconsensus.common.ToLongFunction;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import openconsensus.metrics.export.MetricProducer;
 | 
			
		||||
import openconsensus.metrics.export.MetricProducerManager;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Creates and manages your application's set of metrics. The default implementation of this creates
 | 
			
		||||
 * a {@link MetricProducer} and registers it to the global {@link
 | 
			
		||||
 * MetricProducerManager}.
 | 
			
		||||
 * a {@link MetricProducer} and registers it to the global {@link MetricProducerManager}.
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,13 +16,13 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
import openconsensus.metrics.export.ExportComponent;
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.metrics.export.MetricProducerManager;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -49,8 +49,7 @@ public final class Metrics {
 | 
			
		|||
  /**
 | 
			
		||||
   * Returns the global {@link MetricRegistry}.
 | 
			
		||||
   *
 | 
			
		||||
   * <p>This {@code MetricRegistry} is already added to the global {@link
 | 
			
		||||
   * MetricProducerManager}.
 | 
			
		||||
   * <p>This {@code MetricRegistry} is already added to the global {@link MetricProducerManager}.
 | 
			
		||||
   *
 | 
			
		||||
   * @return the global {@code MetricRegistry}.
 | 
			
		||||
   * @since 0.1.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,12 +17,12 @@
 | 
			
		|||
package openconsensus.metrics.data;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Map.Entry;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.NonNull;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,4 +25,4 @@
 | 
			
		|||
@ExperimentalApi
 | 
			
		||||
package openconsensus.metrics.data;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,16 +17,16 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.data.Exemplar;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.common.Functions;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.data.Exemplar;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link Distribution} contains summary statistics for a population of values. It optionally
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,16 +17,16 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.export.Value.ValueDistribution;
 | 
			
		||||
import openconsensus.metrics.export.Value.ValueDouble;
 | 
			
		||||
import openconsensus.metrics.export.Value.ValueLong;
 | 
			
		||||
import openconsensus.metrics.export.Value.ValueSummary;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A {@link Metric} with one or more {@link TimeSeries}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,13 +17,13 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.LabelKey;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.LabelKey;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link MetricDescriptor} defines a {@code Metric} type and its schema.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,8 +16,8 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A {@link Metric} producer that can be registered for exporting using {@link
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,11 +16,11 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Keeps a set of {@link MetricProducer} that is used by exporters to determine the metrics that
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A timestamped measurement of a {@code TimeSeries}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,13 +17,13 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Implementation of the {@link Distribution} as a summary of observations.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,16 +17,16 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.LabelKey;
 | 
			
		||||
import openconsensus.metrics.LabelValue;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.LabelKey;
 | 
			
		||||
import openconsensus.metrics.LabelValue;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A collection of data points that describes the time-varying values of a {@code Metric}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.metrics.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The actual point value for a {@link Point}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,4 +31,4 @@
 | 
			
		|||
@ExperimentalApi
 | 
			
		||||
package openconsensus.metrics;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,6 @@
 | 
			
		|||
package openconsensus.resource;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.LinkedHashMap;
 | 
			
		||||
| 
						 | 
				
			
			@ -28,6 +24,10 @@ import java.util.List;
 | 
			
		|||
import java.util.Map;
 | 
			
		||||
import java.util.Map.Entry;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			@ -45,8 +45,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		|||
@AutoValue
 | 
			
		||||
@ExperimentalApi
 | 
			
		||||
public abstract class Resource {
 | 
			
		||||
  @DefaultVisibilityForTesting
 | 
			
		||||
  static final int MAX_LENGTH = 255;
 | 
			
		||||
  @DefaultVisibilityForTesting static final int MAX_LENGTH = 255;
 | 
			
		||||
  private static final String OC_RESOURCE_TYPE_ENV = "OC_RESOURCE_TYPE";
 | 
			
		||||
  private static final String OC_RESOURCE_LABELS_ENV = "OC_RESOURCE_LABELS";
 | 
			
		||||
  private static final String LABEL_LIST_SPLITTER = ",";
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,4 +46,4 @@
 | 
			
		|||
@ExperimentalApi
 | 
			
		||||
package openconsensus.resource;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link Aggregation} is the process of combining a certain set of {@code MeasureValue}s for a
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,13 +17,13 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.data.Exemplar;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.data.Exemplar;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link AggregationData} is the result of applying a given {@link Aggregation} to a set of {@code
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,13 +17,13 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The bucket boundaries for a histogram.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,11 +17,11 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The definition of the {@link Measurement} that is taken by OpenCensus library.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,13 +16,13 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.concurrent.NotThreadSafe;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.metrics.data.AttachmentValue;
 | 
			
		||||
import openconsensus.metrics.data.AttachmentValue.AttachmentValueString;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureDouble;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureLong;
 | 
			
		||||
import openconsensus.tags.TagContext;
 | 
			
		||||
import javax.annotation.concurrent.NotThreadSafe;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A map from {@link Measure}s to measured values to be recorded at the same time.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,10 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureDouble;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureLong;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Immutable representation of a Measurement.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,13 +16,6 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.Functions;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureDouble;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureLong;
 | 
			
		||||
import openconsensus.tags.TagContext;
 | 
			
		||||
import openconsensus.tags.TagValue;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +28,13 @@ import java.util.logging.Logger;
 | 
			
		|||
import javax.annotation.concurrent.GuardedBy;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.common.Functions;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureDouble;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureLong;
 | 
			
		||||
import openconsensus.tags.TagContext;
 | 
			
		||||
import openconsensus.tags.TagValue;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,11 +16,11 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class for accessing the default {@link StatsComponent}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,18 +17,18 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.Duration;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.tags.TagKey;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Comparator;
 | 
			
		||||
import java.util.HashSet;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Duration;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.tags.TagKey;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A View specifies an aggregation and a set of tag keys. The aggregation will be broken down by the
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,6 +17,13 @@
 | 
			
		|||
package openconsensus.stats;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Map.Entry;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Duration;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.common.Functions;
 | 
			
		||||
| 
						 | 
				
			
			@ -34,13 +41,6 @@ import openconsensus.stats.AggregationData.SumDataLong;
 | 
			
		|||
import openconsensus.stats.Measure.MeasureDouble;
 | 
			
		||||
import openconsensus.stats.Measure.MeasureLong;
 | 
			
		||||
import openconsensus.tags.TagValue;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Map.Entry;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,15 +16,15 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.tags;
 | 
			
		||||
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.internal.NoopScope;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.tags.propagation.TagContextBinarySerializer;
 | 
			
		||||
import openconsensus.tags.propagation.TagPropagationComponent;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
 | 
			
		||||
/** No-op implementations of tagging classes. */
 | 
			
		||||
final class NoopTags {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,8 @@
 | 
			
		|||
package openconsensus.tags;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.tags.TagMetadata.TagTtl;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.tags.TagMetadata.TagTtl;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link TagKey} paired with a {@link TagValue}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.tags;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A key to a value stored in a {@link TagContext}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,9 +17,9 @@
 | 
			
		|||
package openconsensus.tags;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.StringUtils;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A validated tag value.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,12 +16,12 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.tags;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
import openconsensus.tags.propagation.TagPropagationComponent;
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
import openconsensus.tags.propagation.TagPropagationComponent;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class for accessing the default {@link TagsComponent}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,17 +17,17 @@
 | 
			
		|||
package openconsensus.tags.unsafe;
 | 
			
		||||
 | 
			
		||||
import io.grpc.Context;
 | 
			
		||||
import openconsensus.tags.Tag;
 | 
			
		||||
import openconsensus.tags.TagContext;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.Iterator;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.tags.Tag;
 | 
			
		||||
import openconsensus.tags.TagContext;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Utility methods for accessing the {@link TagContext} contained in the {@link io.grpc.Context}.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>Most code should interact with the current context via the public APIs in {@link
 | 
			
		||||
 * TagContext} and avoid accessing {@link #TAG_CONTEXT_KEY} directly.
 | 
			
		||||
 * <p>Most code should interact with the current context via the public APIs in {@link TagContext}
 | 
			
		||||
 * and avoid accessing {@link #TAG_CONTEXT_KEY} directly.
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,11 +17,11 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A text annotation with a set of attributes.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,10 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Function;
 | 
			
		||||
import openconsensus.common.Functions;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents all the possible values for an attribute. An attribute can have 3 types
 | 
			
		||||
| 
						 | 
				
			
			@ -86,8 +86,8 @@ public abstract class AttributeValue {
 | 
			
		|||
   * @param booleanFunction the function that should be applied if the value has type {@code
 | 
			
		||||
   *     Boolean}.
 | 
			
		||||
   * @param defaultFunction the function that should be applied if the value has a type that was
 | 
			
		||||
   *     added after this {@code match} method was added to the API. See {@link
 | 
			
		||||
   *     Functions} for some common functions for handling unknown types.
 | 
			
		||||
   *     added after this {@code match} method was added to the API. See {@link Functions} for some
 | 
			
		||||
   *     common functions for handling unknown types.
 | 
			
		||||
   * @return the result of the function applied to the underlying value.
 | 
			
		||||
   * @since 0.1.0
 | 
			
		||||
   * @deprecated in favor of {@link #match(Function, Function, Function, Function, Function)}.
 | 
			
		||||
| 
						 | 
				
			
			@ -109,8 +109,8 @@ public abstract class AttributeValue {
 | 
			
		|||
   *     Boolean}.
 | 
			
		||||
   * @param doubleFunction the function that should be applied if the value has type {@code Double}.
 | 
			
		||||
   * @param defaultFunction the function that should be applied if the value has a type that was
 | 
			
		||||
   *     added after this {@code match} method was added to the API. See {@link
 | 
			
		||||
   *     Functions} for some common functions for handling unknown types.
 | 
			
		||||
   *     added after this {@code match} method was added to the API. See {@link Functions} for some
 | 
			
		||||
   *     common functions for handling unknown types.
 | 
			
		||||
   * @return the result of the function applied to the underlying value.
 | 
			
		||||
   * @since 0.1.0
 | 
			
		||||
   */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,8 +16,8 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
final class BigendianEncoding {
 | 
			
		||||
  static final int LONG_BYTES = Long.SIZE / Byte.SIZE;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The {@code BlankSpan} is a singleton class, which is the default {@link Span} that is used when
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,10 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import io.grpc.Context;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.trace.unsafe.ContextUtils;
 | 
			
		||||
import java.util.concurrent.Callable;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.trace.unsafe.ContextUtils;
 | 
			
		||||
 | 
			
		||||
/** Util methods/functionality to interact with the {@link Span} in the {@link io.grpc.Context}. */
 | 
			
		||||
final class CurrentSpanUtils {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,10 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.trace.export.SampledSpanStore;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -51,8 +51,7 @@ public abstract class EndSpanOptions {
 | 
			
		|||
 | 
			
		||||
  /**
 | 
			
		||||
   * If {@code true} this is equivalent with calling the {@link
 | 
			
		||||
   * SampledSpanStore#registerSpanNamesForCollection(Collection)} in
 | 
			
		||||
   * advance for this span name.
 | 
			
		||||
   * SampledSpanStore#registerSpanNamesForCollection(Collection)} in advance for this span name.
 | 
			
		||||
   *
 | 
			
		||||
   * @return {@code true} if the name of the {@code Span} should be registered to the {@code
 | 
			
		||||
   *     SampledSpanStore}.
 | 
			
		||||
| 
						 | 
				
			
			@ -93,15 +92,14 @@ public abstract class EndSpanOptions {
 | 
			
		|||
 | 
			
		||||
    /**
 | 
			
		||||
     * If set to {@code true} this is equivalent with calling the {@link
 | 
			
		||||
     * SampledSpanStore#registerSpanNamesForCollection(Collection)} in
 | 
			
		||||
     * advance for the given span name.
 | 
			
		||||
     * SampledSpanStore#registerSpanNamesForCollection(Collection)} in advance for the given span
 | 
			
		||||
     * name.
 | 
			
		||||
     *
 | 
			
		||||
     * <p>WARNING: setting this option to a randomly generated span name can OOM your process
 | 
			
		||||
     * because the library will save samples for each name.
 | 
			
		||||
     *
 | 
			
		||||
     * <p>It is strongly recommended to use the {@link
 | 
			
		||||
     * SampledSpanStore#registerSpanNamesForCollection(Collection)} API
 | 
			
		||||
     * instead.
 | 
			
		||||
     * SampledSpanStore#registerSpanNamesForCollection(Collection)} API instead.
 | 
			
		||||
     *
 | 
			
		||||
     * @return this.
 | 
			
		||||
     * @since 0.1.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,8 +17,8 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents a generic messaging event. This class can represent messaging happened in
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,10 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents a network event. It requires a {@link Type type} and a message id that
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,13 +16,13 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.internal.BaseMessageEventUtils;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.EnumSet;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.internal.BaseMessageEventUtils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * An abstract class that represents a span. It has an associated {@link SpanContext} and a set of
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,11 +17,11 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.errorprone.annotations.MustBeClosed;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.concurrent.Callable;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * {@link SpanBuilder} is used to construct {@link Span} instances which define arbitrary scopes of
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,10 +16,10 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Random;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents a span identifier. A valid span identifier is an 8-byte array with at
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,6 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +23,7 @@ import java.util.List;
 | 
			
		|||
import java.util.TreeMap;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.dataflow.qual.Deterministic;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,11 +16,11 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.Internal;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Random;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Internal;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents a trace identifier. A valid trace identifier is a 16-byte array with at
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,16 +16,16 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A class that represents global trace options. These options are propagated to all child {@link
 | 
			
		||||
 * Span spans}. These determine features such as whether a {@code Span} should
 | 
			
		||||
 * be traced. It is implemented as a bitmask.
 | 
			
		||||
 * Span spans}. These determine features such as whether a {@code Span} should be traced. It is
 | 
			
		||||
 * implemented as a bitmask.
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,11 +17,11 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.errorprone.annotations.MustBeClosed;
 | 
			
		||||
import java.util.concurrent.Callable;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.Scope;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.SpanBuilder.NoopSpanBuilder;
 | 
			
		||||
import java.util.concurrent.Callable;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Tracer is a simple, thin class for {@link Span} creation and in-process context interaction.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,12 +17,12 @@
 | 
			
		|||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Carries tracing-system specific context in a list of key-value pairs. TraceState allows different
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,15 +16,15 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace;
 | 
			
		||||
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.Clock;
 | 
			
		||||
import openconsensus.internal.DefaultVisibilityForTesting;
 | 
			
		||||
import openconsensus.internal.Provider;
 | 
			
		||||
import openconsensus.trace.config.TraceConfig;
 | 
			
		||||
import openconsensus.trace.export.ExportComponent;
 | 
			
		||||
import openconsensus.trace.propagation.PropagationComponent;
 | 
			
		||||
import java.util.logging.Level;
 | 
			
		||||
import java.util.logging.Logger;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class that manages a global instance of the {@link TraceComponent}.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,16 +17,16 @@
 | 
			
		|||
package openconsensus.trace.config;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.Annotation;
 | 
			
		||||
import openconsensus.trace.Link;
 | 
			
		||||
import openconsensus.trace.MessageEvent;
 | 
			
		||||
import openconsensus.trace.NetworkEvent;
 | 
			
		||||
import openconsensus.trace.Sampler;
 | 
			
		||||
import openconsensus.trace.Span;
 | 
			
		||||
import openconsensus.trace.samplers.Samplers;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.trace.NetworkEvent;
 | 
			
		||||
import openconsensus.trace.SpanBuilder;
 | 
			
		||||
import openconsensus.trace.samplers.Samplers;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Class that holds global trace parameters.
 | 
			
		||||
| 
						 | 
				
			
			@ -92,8 +92,7 @@ public abstract class TraceParams {
 | 
			
		|||
  public abstract int getMaxNumberOfMessageEvents();
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Returns the global default max number of {@link NetworkEvent} events per
 | 
			
		||||
   * {@link Span}.
 | 
			
		||||
   * Returns the global default max number of {@link NetworkEvent} events per {@link Span}.
 | 
			
		||||
   *
 | 
			
		||||
   * @return the global default max number of {@code NetworkEvent} events per {@code Span}.
 | 
			
		||||
   * @deprecated Use {@link getMaxNumberOfMessageEvents}.
 | 
			
		||||
| 
						 | 
				
			
			@ -173,12 +172,10 @@ public abstract class TraceParams {
 | 
			
		|||
    public abstract Builder setMaxNumberOfMessageEvents(int maxNumberOfMessageEvents);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Sets the global default max number of {@link NetworkEvent} events per
 | 
			
		||||
     * {@link Span}.
 | 
			
		||||
     * Sets the global default max number of {@link NetworkEvent} events per {@link Span}.
 | 
			
		||||
     *
 | 
			
		||||
     * @param maxNumberOfNetworkEvents the global default max number of {@link
 | 
			
		||||
     *     NetworkEvent} events per {@link Span}. It must be positive otherwise
 | 
			
		||||
     *     {@link #build()} will throw an exception.
 | 
			
		||||
     * @param maxNumberOfNetworkEvents the global default max number of {@link NetworkEvent} events
 | 
			
		||||
     *     per {@link Span}. It must be positive otherwise {@link #build()} will throw an exception.
 | 
			
		||||
     * @return this.
 | 
			
		||||
     * @deprecated Use {@link setMaxNumberOfMessageEvents}.
 | 
			
		||||
     * @since 0.1.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,21 +17,21 @@
 | 
			
		|||
package openconsensus.trace.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.Span.Options;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class allows users to access in-process information about all running spans.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>The running spans tracking is available for all the spans with the option {@link
 | 
			
		||||
 * Options#RECORD_EVENTS}. This functionality allows users to debug stuck
 | 
			
		||||
 * operations or long living operations.
 | 
			
		||||
 * Options#RECORD_EVENTS}. This functionality allows users to debug stuck operations or long living
 | 
			
		||||
 * operations.
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,10 +17,6 @@
 | 
			
		|||
package openconsensus.trace.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.EndSpanOptions;
 | 
			
		||||
import openconsensus.trace.Status;
 | 
			
		||||
import openconsensus.trace.Status.CanonicalCode;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
| 
						 | 
				
			
			@ -32,16 +28,20 @@ import javax.annotation.Nullable;
 | 
			
		|||
import javax.annotation.concurrent.GuardedBy;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.EndSpanOptions;
 | 
			
		||||
import openconsensus.trace.Span.Options;
 | 
			
		||||
import openconsensus.trace.Status;
 | 
			
		||||
import openconsensus.trace.Status.CanonicalCode;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This class allows users to access in-process information such as latency based sampled spans and
 | 
			
		||||
 * error based sampled spans.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>For all completed spans with the option {@link Options#RECORD_EVENTS} the library can
 | 
			
		||||
 * store samples based on latency for succeeded operations or based on error code for failed
 | 
			
		||||
 * operations. To activate this, users MUST manually configure all the span names for which samples
 | 
			
		||||
 * will be collected (see {@link #registerSpanNamesForCollection(Collection)}).
 | 
			
		||||
 * <p>For all completed spans with the option {@link Options#RECORD_EVENTS} the library can store
 | 
			
		||||
 * samples based on latency for succeeded operations or based on error code for failed operations.
 | 
			
		||||
 * To activate this, users MUST manually configure all the span names for which samples will be
 | 
			
		||||
 * collected (see {@link #registerSpanNamesForCollection(Collection)}).
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,18 +17,6 @@
 | 
			
		|||
package openconsensus.trace.export;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.Annotation;
 | 
			
		||||
import openconsensus.trace.AttributeValue;
 | 
			
		||||
import openconsensus.trace.Link;
 | 
			
		||||
import openconsensus.trace.MessageEvent;
 | 
			
		||||
import openconsensus.trace.Span;
 | 
			
		||||
import openconsensus.trace.Span.Kind;
 | 
			
		||||
import openconsensus.trace.SpanContext;
 | 
			
		||||
import openconsensus.trace.SpanId;
 | 
			
		||||
import openconsensus.trace.Status;
 | 
			
		||||
import openconsensus.trace.internal.BaseMessageEventUtils;
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
| 
						 | 
				
			
			@ -36,8 +24,20 @@ import java.util.List;
 | 
			
		|||
import java.util.Map;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
import openconsensus.common.Timestamp;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.Annotation;
 | 
			
		||||
import openconsensus.trace.AttributeValue;
 | 
			
		||||
import openconsensus.trace.BaseMessageEvent;
 | 
			
		||||
import openconsensus.trace.Link;
 | 
			
		||||
import openconsensus.trace.MessageEvent;
 | 
			
		||||
import openconsensus.trace.NetworkEvent;
 | 
			
		||||
import openconsensus.trace.Span;
 | 
			
		||||
import openconsensus.trace.Span.Kind;
 | 
			
		||||
import openconsensus.trace.SpanContext;
 | 
			
		||||
import openconsensus.trace.SpanId;
 | 
			
		||||
import openconsensus.trace.Status;
 | 
			
		||||
import openconsensus.trace.internal.BaseMessageEventUtils;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.dataflow.qual.Deterministic;
 | 
			
		||||
| 
						 | 
				
			
			@ -129,8 +129,7 @@ public abstract class SpanData {
 | 
			
		|||
      @Nullable Timestamp endTimestamp) {
 | 
			
		||||
    Utils.checkNotNull(messageOrNetworkEvents, "messageOrNetworkEvents");
 | 
			
		||||
    List<TimedEvent<MessageEvent>> messageEventsList = new ArrayList<TimedEvent<MessageEvent>>();
 | 
			
		||||
    for (TimedEvent<? extends BaseMessageEvent> timedEvent :
 | 
			
		||||
        messageOrNetworkEvents.getEvents()) {
 | 
			
		||||
    for (TimedEvent<? extends BaseMessageEvent> timedEvent : messageOrNetworkEvents.getEvents()) {
 | 
			
		||||
      BaseMessageEvent event = timedEvent.getEvent();
 | 
			
		||||
      if (event instanceof MessageEvent) {
 | 
			
		||||
        @SuppressWarnings("unchecked")
 | 
			
		||||
| 
						 | 
				
			
			@ -242,16 +241,14 @@ public abstract class SpanData {
 | 
			
		|||
  @SuppressWarnings({"deprecation"})
 | 
			
		||||
  public TimedEvents<NetworkEvent> getNetworkEvents() {
 | 
			
		||||
    TimedEvents<MessageEvent> timedEvents = getMessageEvents();
 | 
			
		||||
    List<TimedEvent<NetworkEvent>> networkEventsList =
 | 
			
		||||
        new ArrayList<TimedEvent<NetworkEvent>>();
 | 
			
		||||
    List<TimedEvent<NetworkEvent>> networkEventsList = new ArrayList<TimedEvent<NetworkEvent>>();
 | 
			
		||||
    for (TimedEvent<MessageEvent> timedEvent : timedEvents.getEvents()) {
 | 
			
		||||
      networkEventsList.add(
 | 
			
		||||
          TimedEvent.<NetworkEvent>create(
 | 
			
		||||
              timedEvent.getTimestamp(),
 | 
			
		||||
              BaseMessageEventUtils.asNetworkEvent(timedEvent.getEvent())));
 | 
			
		||||
    }
 | 
			
		||||
    return TimedEvents.<NetworkEvent>create(
 | 
			
		||||
        networkEventsList, timedEvents.getDroppedEventsCount());
 | 
			
		||||
    return TimedEvents.<NetworkEvent>create(networkEventsList, timedEvents.getDroppedEventsCount());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,10 +16,10 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace.export;
 | 
			
		||||
 | 
			
		||||
import openconsensus.trace.Span;
 | 
			
		||||
import openconsensus.trace.TraceOptions;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
import javax.annotation.concurrent.ThreadSafe;
 | 
			
		||||
import openconsensus.trace.Span;
 | 
			
		||||
import openconsensus.trace.TraceOptions;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A service that is used by the library to export {@code SpanData} for all the spans that are part
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,25 +22,20 @@ import openconsensus.trace.BaseMessageEvent;
 | 
			
		|||
import openconsensus.trace.MessageEvent;
 | 
			
		||||
import openconsensus.trace.NetworkEvent;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Helper class to convert/cast between for {@link MessageEvent} and {@link
 | 
			
		||||
 * NetworkEvent}.
 | 
			
		||||
 */
 | 
			
		||||
/** Helper class to convert/cast between for {@link MessageEvent} and {@link NetworkEvent}. */
 | 
			
		||||
@Internal
 | 
			
		||||
@SuppressWarnings("deprecation")
 | 
			
		||||
public final class BaseMessageEventUtils {
 | 
			
		||||
  /**
 | 
			
		||||
   * Cast or convert a {@link BaseMessageEvent} to {@link
 | 
			
		||||
   * MessageEvent}.
 | 
			
		||||
   * Cast or convert a {@link BaseMessageEvent} to {@link MessageEvent}.
 | 
			
		||||
   *
 | 
			
		||||
   * <p>Warning: if the input is a {@code NetworkEvent} and contains {@code
 | 
			
		||||
   * kernelTimestamp} information, this information will be dropped.
 | 
			
		||||
   * <p>Warning: if the input is a {@code NetworkEvent} and contains {@code kernelTimestamp}
 | 
			
		||||
   * information, this information will be dropped.
 | 
			
		||||
   *
 | 
			
		||||
   * @param event the {@code BaseMessageEvent} that is being cast or converted.
 | 
			
		||||
   * @return a {@code MessageEvent} representation of the input.
 | 
			
		||||
   */
 | 
			
		||||
  public static MessageEvent asMessageEvent(
 | 
			
		||||
      BaseMessageEvent event) {
 | 
			
		||||
  public static MessageEvent asMessageEvent(BaseMessageEvent event) {
 | 
			
		||||
    Utils.checkNotNull(event, "event");
 | 
			
		||||
    if (event instanceof MessageEvent) {
 | 
			
		||||
      return (MessageEvent) event;
 | 
			
		||||
| 
						 | 
				
			
			@ -57,14 +52,12 @@ public final class BaseMessageEventUtils {
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Cast or convert a {@link BaseMessageEvent} to {@link
 | 
			
		||||
   * NetworkEvent}.
 | 
			
		||||
   * Cast or convert a {@link BaseMessageEvent} to {@link NetworkEvent}.
 | 
			
		||||
   *
 | 
			
		||||
   * @param event the {@code BaseMessageEvent} that is being cast or converted.
 | 
			
		||||
   * @return a {@code NetworkEvent} representation of the input.
 | 
			
		||||
   */
 | 
			
		||||
  public static NetworkEvent asNetworkEvent(
 | 
			
		||||
      BaseMessageEvent event) {
 | 
			
		||||
  public static NetworkEvent asNetworkEvent(BaseMessageEvent event) {
 | 
			
		||||
    Utils.checkNotNull(event, "event");
 | 
			
		||||
    if (event instanceof NetworkEvent) {
 | 
			
		||||
      return (NetworkEvent) event;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace.propagation;
 | 
			
		||||
 | 
			
		||||
import java.text.ParseException;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.SpanContext;
 | 
			
		||||
import java.text.ParseException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is a helper class for {@link SpanContext} propagation on the wire using binary encoding.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,12 +16,12 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace.propagation;
 | 
			
		||||
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.SpanContext;
 | 
			
		||||
import java.util.Collections;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import openconsensus.common.ExperimentalApi;
 | 
			
		||||
import openconsensus.internal.Utils;
 | 
			
		||||
import openconsensus.trace.SpanContext;
 | 
			
		||||
 | 
			
		||||
/*>>>
 | 
			
		||||
import org.checkerframework.checker.nullness.qual.NonNull;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,14 +16,14 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace.samplers;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
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 java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/** Sampler that always makes a "yes" decision on {@link Span} sampling. */
 | 
			
		||||
@Immutable
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,14 +16,14 @@
 | 
			
		|||
 | 
			
		||||
package openconsensus.trace.samplers;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
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 java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/** Sampler that always makes a "no" decision on {@link Span} sampling. */
 | 
			
		||||
@Immutable
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,15 +17,15 @@
 | 
			
		|||
package openconsensus.trace.samplers;
 | 
			
		||||
 | 
			
		||||
import com.google.auto.value.AutoValue;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
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 java.util.List;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import javax.annotation.concurrent.Immutable;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * We assume the lower 64 bits of the traceId's are randomly distributed around the whole (long)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,8 +27,8 @@ import org.checkerframework.checker.nullness.qual.Nullable;
 | 
			
		|||
/**
 | 
			
		||||
 * Util methods/functionality to interact with the {@link io.grpc.Context}.
 | 
			
		||||
 *
 | 
			
		||||
 * <p>Users must interact with the current Context via the public APIs in {@link
 | 
			
		||||
 * Tracer} and avoid usages of the {@link #CONTEXT_SPAN_KEY} directly.
 | 
			
		||||
 * <p>Users must interact with the current Context via the public APIs in {@link Tracer} and avoid
 | 
			
		||||
 * usages of the {@link #CONTEXT_SPAN_KEY} directly.
 | 
			
		||||
 *
 | 
			
		||||
 * @since 0.1.0
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue