Remove since tags until 1.0.0 (#1796)
* Remove since tags until 1.0.0 * Spotless
This commit is contained in:
parent
7d269be811
commit
0ceff17dfa
|
|
@ -53,7 +53,6 @@ public final class OpenTelemetry {
|
|||
* @return registered TracerProvider or default via {@link DefaultTracerProvider#getInstance()}.
|
||||
* @throws IllegalStateException if a specified TracerProvider (via system properties) could not
|
||||
* be found.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static TracerProvider getTracerProvider() {
|
||||
return getInstance().tracerProvider;
|
||||
|
|
@ -67,7 +66,6 @@ public final class OpenTelemetry {
|
|||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @return a tracer instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static Tracer getTracer(String instrumentationName) {
|
||||
return getTracerProvider().get(instrumentationName);
|
||||
|
|
@ -84,7 +82,6 @@ public final class OpenTelemetry {
|
|||
* @param instrumentationVersion The version of the instrumentation library (e.g.,
|
||||
* "semver:1.0.0").
|
||||
* @return a tracer instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static Tracer getTracer(String instrumentationName, String instrumentationVersion) {
|
||||
return getTracerProvider().get(instrumentationName, instrumentationVersion);
|
||||
|
|
@ -96,7 +93,6 @@ public final class OpenTelemetry {
|
|||
* @return registered MeterProvider or default via {@link DefaultMeterProvider#getInstance()}.
|
||||
* @throws IllegalStateException if a specified MeterProvider (via system properties) could not be
|
||||
* found.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static MeterProvider getMeterProvider() {
|
||||
return getInstance().meterProvider;
|
||||
|
|
@ -110,7 +106,6 @@ public final class OpenTelemetry {
|
|||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @return a tracer instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static Meter getMeter(String instrumentationName) {
|
||||
return getMeterProvider().get(instrumentationName);
|
||||
|
|
@ -126,7 +121,6 @@ public final class OpenTelemetry {
|
|||
* instrument*ed* library.
|
||||
* @param instrumentationVersion The version of the instrumentation library.
|
||||
* @return a tracer instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static Meter getMeter(String instrumentationName, String instrumentationVersion) {
|
||||
return getMeterProvider().get(instrumentationName, instrumentationVersion);
|
||||
|
|
@ -138,7 +132,6 @@ public final class OpenTelemetry {
|
|||
* @return registered manager or default via {@link DefaultBaggageManager#getInstance()}.
|
||||
* @throws IllegalStateException if a specified manager (via system properties) could not be
|
||||
* found.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static BaggageManager getBaggageManager() {
|
||||
return getInstance().contextManager;
|
||||
|
|
@ -152,7 +145,6 @@ public final class OpenTelemetry {
|
|||
* with {@link HttpTraceContext} registered.
|
||||
* @throws IllegalStateException if a specified manager (via system properties) could not be
|
||||
* found.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static ContextPropagators getPropagators() {
|
||||
return getInstance().propagators;
|
||||
|
|
@ -166,7 +158,6 @@ public final class OpenTelemetry {
|
|||
* @throws IllegalStateException if a specified manager (via system properties) could not be
|
||||
* found.
|
||||
* @throws NullPointerException if {@code propagators} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static void setPropagators(ContextPropagators propagators) {
|
||||
Objects.requireNonNull(propagators, "propagators");
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
*
|
||||
* <p>For example, {@code Baggage}s can be used to label stats, log messages, or debugging
|
||||
* information.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@Immutable
|
||||
public interface Baggage {
|
||||
|
|
@ -26,7 +24,6 @@ public interface Baggage {
|
|||
* guaranteed.
|
||||
*
|
||||
* @return an immutable collection of the entries in this {@code Baggage}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Collection<Entry> getEntries();
|
||||
|
||||
|
|
@ -40,11 +37,7 @@ public interface Baggage {
|
|||
@Nullable
|
||||
String getEntryValue(String entryKey);
|
||||
|
||||
/**
|
||||
* Builder for the {@link Baggage} class.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** Builder for the {@link Baggage} class. */
|
||||
interface Builder {
|
||||
/**
|
||||
* Sets the parent {@link Baggage} to use from the specified {@code Context}. If no parent
|
||||
|
|
@ -63,7 +56,6 @@ public interface Baggage {
|
|||
* @return this.
|
||||
* @throws NullPointerException if {@code context} is {@code null}.
|
||||
* @see #setNoParent()
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Builder setParent(Context context);
|
||||
|
||||
|
|
@ -73,7 +65,6 @@ public interface Baggage {
|
|||
* BaggageManager#getCurrentBaggage()} at {@link #build()} time will be used as parent.
|
||||
*
|
||||
* @return this.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Builder setNoParent();
|
||||
|
||||
|
|
@ -84,7 +75,6 @@ public interface Baggage {
|
|||
* @param value the {@code String} value to set for the given key.
|
||||
* @param entryMetadata the {@code EntryMetadata} associated with this {@link Entry}.
|
||||
* @return this
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Builder put(String key, String value, EntryMetadata entryMetadata);
|
||||
|
||||
|
|
@ -93,7 +83,6 @@ public interface Baggage {
|
|||
*
|
||||
* @param key the {@code String} key which will be removed.
|
||||
* @return this
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Builder remove(String key);
|
||||
|
||||
|
|
@ -101,7 +90,6 @@ public interface Baggage {
|
|||
* Creates a {@code Baggage} from this builder.
|
||||
*
|
||||
* @return a {@code Baggage} with the same entries as this builder.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Baggage build();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* <p>Implementations may have different constraints and are free to convert entry contexts to their
|
||||
* own subtypes. This means callers cannot assume the {@link #getCurrentBaggage() current context}
|
||||
* is the same instance as the one {@linkplain #withBaggage(Baggage) placed into scope}.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface BaggageManager {
|
||||
|
|
@ -27,7 +25,6 @@ public interface BaggageManager {
|
|||
* Returns the current {@code Baggage}.
|
||||
*
|
||||
* @return the current {@code Baggage}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Baggage getCurrentBaggage();
|
||||
|
||||
|
|
@ -35,7 +32,6 @@ public interface BaggageManager {
|
|||
* Returns a new {@link Baggage.Builder}.
|
||||
*
|
||||
* @return a new {@code Baggage.Builder}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Baggage.Builder baggageBuilder();
|
||||
|
||||
|
|
@ -47,7 +43,6 @@ public interface BaggageManager {
|
|||
* @param baggage the {@code Baggage} to be set as the current context.
|
||||
* @return an object that defines a scope where the given {@code Baggage} is set as the current
|
||||
* context.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
Scope withBaggage(Baggage baggage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ import io.opentelemetry.context.Scope;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* Utility methods for accessing the {@link Baggage} contained in the {@link Context}.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** Utility methods for accessing the {@link Baggage} contained in the {@link Context}. */
|
||||
@Immutable
|
||||
public final class BaggageUtils {
|
||||
private static final ContextKey<Baggage> CORR_CONTEXT_KEY =
|
||||
|
|
@ -27,7 +23,6 @@ public final class BaggageUtils {
|
|||
* @param baggage the value to be set.
|
||||
* @param context the parent {@code Context}.
|
||||
* @return a new context with the given value set.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Context withBaggage(Baggage baggage, Context context) {
|
||||
return context.withValues(CORR_CONTEXT_KEY, baggage);
|
||||
|
|
@ -38,7 +33,6 @@ public final class BaggageUtils {
|
|||
* to an empty {@link Baggage}.
|
||||
*
|
||||
* @return the {@link Baggage} from the {@linkplain Context#current current context}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Baggage getCurrentBaggage() {
|
||||
return getBaggage(Context.current());
|
||||
|
|
@ -50,7 +44,6 @@ public final class BaggageUtils {
|
|||
*
|
||||
* @param context the specified {@code Context}.
|
||||
* @return the {@link Baggage} from the specified {@code Context}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Baggage getBaggage(Context context) {
|
||||
Baggage baggage = context.getValue(CORR_CONTEXT_KEY);
|
||||
|
|
@ -63,7 +56,6 @@ public final class BaggageUtils {
|
|||
*
|
||||
* @param context the specified {@code Context}.
|
||||
* @return the {@link Baggage} from the specified {@code Context}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@Nullable
|
||||
public static Baggage getBaggageWithoutDefault(Context context) {
|
||||
|
|
@ -76,7 +68,6 @@ public final class BaggageUtils {
|
|||
*
|
||||
* @param baggage the {@link Baggage} to be added to the current {@code Context}.
|
||||
* @return the {@link Scope} for the updated {@code Context}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Scope currentContextWith(Baggage baggage) {
|
||||
Context context = withBaggage(baggage, Context.current());
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ import java.util.Objects;
|
|||
import javax.annotation.concurrent.Immutable;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* No-op implementations of {@link BaggageManager}.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** No-op implementations of {@link BaggageManager}. */
|
||||
@ThreadSafe
|
||||
public final class DefaultBaggageManager implements BaggageManager {
|
||||
private static final DefaultBaggageManager INSTANCE = new DefaultBaggageManager();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ public class EmptyBaggage implements Baggage {
|
|||
* Returns the single instance of the {@link EmptyBaggage} class.
|
||||
*
|
||||
* @return the single instance of the {@code EmptyBaggage} class.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Baggage getInstance() {
|
||||
return INSTANCE;
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@ import io.opentelemetry.internal.StringUtils;
|
|||
import io.opentelemetry.internal.Utils;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* String-String key-value pair, along with {@link EntryMetadata}.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** String-String key-value pair, along with {@link EntryMetadata}. */
|
||||
@Immutable
|
||||
@AutoValue
|
||||
public abstract class Entry {
|
||||
|
|
@ -28,7 +24,6 @@ public abstract class Entry {
|
|||
* @param value the entry value.
|
||||
* @param entryMetadata the entry metadata.
|
||||
* @return a {@code Entry}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Entry create(String key, String value, EntryMetadata entryMetadata) {
|
||||
Utils.checkArgument(keyIsValid(key), "Invalid entry key name: %s", key);
|
||||
|
|
@ -42,7 +37,6 @@ public abstract class Entry {
|
|||
* @param key the entry key.
|
||||
* @param value the entry value.
|
||||
* @return a {@code Entry}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static Entry create(String key, String value) {
|
||||
return create(key, value, EntryMetadata.EMPTY);
|
||||
|
|
@ -52,7 +46,6 @@ public abstract class Entry {
|
|||
* Returns the entry's key.
|
||||
*
|
||||
* @return the entry's key.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public abstract String getKey();
|
||||
|
||||
|
|
@ -60,7 +53,6 @@ public abstract class Entry {
|
|||
* Returns the entry's value.
|
||||
*
|
||||
* @return the entry's value.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public abstract String getValue();
|
||||
|
||||
|
|
@ -68,7 +60,6 @@ public abstract class Entry {
|
|||
* Returns the (optional) {@link EntryMetadata} associated with this {@link Entry}.
|
||||
*
|
||||
* @return the {@code EntryMetadata}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public abstract EntryMetadata getEntryMetadata();
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
/**
|
||||
* {@link EntryMetadata} contains properties associated with an {@link Entry}. This is an opaque
|
||||
* wrapper for a String metadata value.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@Immutable
|
||||
@AutoValue
|
||||
|
|
@ -26,7 +24,6 @@ public abstract class EntryMetadata {
|
|||
*
|
||||
* @param metadata TTL of an {@code Entry}.
|
||||
* @return an {@code EntryMetadata}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static EntryMetadata create(String metadata) {
|
||||
return new AutoValue_EntryMetadata(metadata);
|
||||
|
|
@ -36,7 +33,6 @@ public abstract class EntryMetadata {
|
|||
* Returns the String value of this {@link EntryMetadata}.
|
||||
*
|
||||
* @return the raw metadata value.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public abstract String getValue();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ public interface BaggageManagerFactory {
|
|||
* Creates a new {@code BaggageManager} instance.
|
||||
*
|
||||
* @return a {@code BaggageManager} instance.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
BaggageManager create();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,7 @@
|
|||
|
||||
package io.opentelemetry.common;
|
||||
|
||||
/**
|
||||
* Used for iterating over all the key/value pairs in an {@link Attributes} instance.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** Used for iterating over all the key/value pairs in an {@link Attributes} instance. */
|
||||
public interface AttributeConsumer {
|
||||
<T> void consume(AttributeKey<T> key, T value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ package io.opentelemetry.common;
|
|||
/**
|
||||
* An enum that represents all the possible value types for an {@code AttributeKey} and hence the
|
||||
* types of values that are allowed for {@link Attributes}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public enum AttributeType {
|
||||
STRING,
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ package io.opentelemetry.common;
|
|||
*
|
||||
* <p>This interface should be considered to be a FunctionalInterface in the java 8+ meaning of that
|
||||
* term.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public interface LabelConsumer {
|
||||
void consume(String key, String value);
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* that are returned from the API, and cast them to their SDK specific implementations, then those
|
||||
* casts will fail under auto-instrumentation, because auto-instrumentation takes over the static
|
||||
* global providers returned by the API and points them to it's embedded SDK.
|
||||
*
|
||||
* @since 0.4.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface Obfuscated<T> {
|
||||
|
|
@ -27,7 +25,6 @@ public interface Obfuscated<T> {
|
|||
* Returns the unobfuscated provider.
|
||||
*
|
||||
* @return the unobfuscated provider.
|
||||
* @since 0.4.0
|
||||
*/
|
||||
T unobfuscate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,15 +19,10 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* kept.
|
||||
*
|
||||
* @param <R> the callback Result type.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface AsynchronousInstrument<R extends Result> extends Instrument {
|
||||
/**
|
||||
* A {@code Callback} for a {@code AsynchronousInstrument}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Callback} for a {@code AsynchronousInstrument}. */
|
||||
interface Callback<R extends Result> {
|
||||
void update(R result);
|
||||
}
|
||||
|
|
@ -39,7 +34,6 @@ public interface AsynchronousInstrument<R extends Result> extends Instrument {
|
|||
* exported then it will never be called.
|
||||
*
|
||||
* @param callback the callback to be executed before export.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void setCallback(Callback<R> callback);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ public interface BatchRecorder {
|
|||
* @param valueRecorder the {@link LongValueRecorder}.
|
||||
* @param value the value to be associated with {@code valueRecorder}.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
BatchRecorder put(LongValueRecorder valueRecorder, long value);
|
||||
|
||||
|
|
@ -33,7 +32,6 @@ public interface BatchRecorder {
|
|||
* @param valueRecorder the {@link DoubleValueRecorder}.
|
||||
* @param value the value to be associated with {@code valueRecorder}.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
BatchRecorder put(DoubleValueRecorder valueRecorder, double value);
|
||||
|
||||
|
|
@ -44,7 +42,6 @@ public interface BatchRecorder {
|
|||
* @param counter the {@link LongCounter}.
|
||||
* @param value the value to be associated with {@code counter}.
|
||||
* @return this.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
BatchRecorder put(LongCounter counter, long value);
|
||||
|
||||
|
|
@ -55,7 +52,6 @@ public interface BatchRecorder {
|
|||
* @param counter the {@link DoubleCounter}.
|
||||
* @param value the value to be associated with {@code counter}.
|
||||
* @return this.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
BatchRecorder put(DoubleCounter counter, double value);
|
||||
|
||||
|
|
@ -66,7 +62,6 @@ public interface BatchRecorder {
|
|||
* @param upDownCounter the {@link LongCounter}.
|
||||
* @param value the value to be associated with {@code counter}.
|
||||
* @return this.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
BatchRecorder put(LongUpDownCounter upDownCounter, long value);
|
||||
|
||||
|
|
@ -77,7 +72,6 @@ public interface BatchRecorder {
|
|||
* @param upDownCounter the {@link DoubleCounter}.
|
||||
* @param value the value to be associated with {@code counter}.
|
||||
* @return this.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
BatchRecorder put(DoubleUpDownCounter upDownCounter, double value);
|
||||
|
||||
|
|
@ -86,8 +80,6 @@ public interface BatchRecorder {
|
|||
*
|
||||
* <p>This method records all measurements every time it is called, so make sure it is not called
|
||||
* twice if not needed.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void record();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,7 @@ import java.util.Objects;
|
|||
import javax.annotation.concurrent.Immutable;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* No-op implementations of {@link Meter}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** No-op implementations of {@link Meter}. */
|
||||
@ThreadSafe
|
||||
public final class DefaultMeter implements Meter {
|
||||
|
||||
|
|
@ -32,7 +28,6 @@ public final class DefaultMeter implements Meter {
|
|||
* Returns a {@code Meter} singleton that is the default implementations for {@link Meter}.
|
||||
*
|
||||
* @return a {@code Meter} singleton that is the default implementations for {@link Meter}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Meter getInstance() {
|
||||
return INSTANCE;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleCounter extends SynchronousInstrument<BoundDoubleCounter> {
|
||||
|
|
@ -49,7 +47,6 @@ public interface DoubleCounter extends SynchronousInstrument<BoundDoubleCounter>
|
|||
*
|
||||
* @param increment the value to add.
|
||||
* @param labels the labels to be associated to this recording.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(double increment, Labels labels);
|
||||
|
||||
|
|
@ -59,18 +56,13 @@ public interface DoubleCounter extends SynchronousInstrument<BoundDoubleCounter>
|
|||
* <p>The value added is associated with the current {@code Context} and with empty labels.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void add(double increment);
|
||||
|
||||
@Override
|
||||
BoundDoubleCounter bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link DoubleCounter}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link DoubleCounter}. */
|
||||
@ThreadSafe
|
||||
interface BoundDoubleCounter extends SynchronousInstrument.BoundInstrument {
|
||||
/**
|
||||
|
|
@ -79,7 +71,6 @@ public interface DoubleCounter extends SynchronousInstrument<BoundDoubleCounter>
|
|||
* <p>The value added is associated with the current {@code Context}.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(double increment);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleSumObserver extends AsynchronousInstrument<DoubleResult> {
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleUpDownCounter extends SynchronousInstrument<BoundDoubleUpDownCounter> {
|
||||
|
|
@ -52,7 +50,6 @@ public interface DoubleUpDownCounter extends SynchronousInstrument<BoundDoubleUp
|
|||
*
|
||||
* @param increment the value to add.
|
||||
* @param labels the labels to be associated to this recording.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(double increment, Labels labels);
|
||||
|
||||
|
|
@ -62,18 +59,13 @@ public interface DoubleUpDownCounter extends SynchronousInstrument<BoundDoubleUp
|
|||
* <p>The value added is associated with the current {@code Context} and empty labels.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void add(double increment);
|
||||
|
||||
@Override
|
||||
BoundDoubleUpDownCounter bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link DoubleUpDownCounter}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link DoubleUpDownCounter}. */
|
||||
@ThreadSafe
|
||||
interface BoundDoubleUpDownCounter extends BoundInstrument {
|
||||
/**
|
||||
|
|
@ -82,7 +74,6 @@ public interface DoubleUpDownCounter extends SynchronousInstrument<BoundDoubleUp
|
|||
* <p>The value added is associated with the current {@code Context}.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(double increment);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleUpDownSumObserver extends AsynchronousInstrument<DoubleResult> {
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.5.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleValueObserver extends AsynchronousInstrument<DoubleResult> {
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface DoubleValueRecorder extends SynchronousInstrument<BoundDoubleValueRecorder> {
|
||||
|
|
@ -61,7 +59,6 @@ public interface DoubleValueRecorder extends SynchronousInstrument<BoundDoubleVa
|
|||
* @param value the measurement to record.
|
||||
* @param labels the set of labels to be associated to this recording
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
void record(double value, Labels labels);
|
||||
|
||||
|
|
@ -70,18 +67,13 @@ public interface DoubleValueRecorder extends SynchronousInstrument<BoundDoubleVa
|
|||
*
|
||||
* @param value the measurement to record.
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void record(double value);
|
||||
|
||||
@Override
|
||||
BoundDoubleValueRecorder bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link DoubleValueRecorder}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link DoubleValueRecorder}. */
|
||||
@ThreadSafe
|
||||
interface BoundDoubleValueRecorder extends SynchronousInstrument.BoundInstrument {
|
||||
/**
|
||||
|
|
@ -89,7 +81,6 @@ public interface DoubleValueRecorder extends SynchronousInstrument<BoundDoubleVa
|
|||
*
|
||||
* @param value the measurement to record.
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void record(double value);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@ package io.opentelemetry.metrics;
|
|||
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* Base interface for all metrics defined in this package.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Base interface for all metrics defined in this package. */
|
||||
@ThreadSafe
|
||||
@SuppressWarnings("InterfaceWithOnlyStatics")
|
||||
public interface Instrument {
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongCounter extends SynchronousInstrument<BoundLongCounter> {
|
||||
|
|
@ -49,7 +47,6 @@ public interface LongCounter extends SynchronousInstrument<BoundLongCounter> {
|
|||
*
|
||||
* @param increment the value to add.
|
||||
* @param labels the set of labels to be associated to this recording.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(long increment, Labels labels);
|
||||
|
||||
|
|
@ -59,18 +56,13 @@ public interface LongCounter extends SynchronousInstrument<BoundLongCounter> {
|
|||
* <p>The value added is associated with the current {@code Context} and empty labels.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void add(long increment);
|
||||
|
||||
@Override
|
||||
BoundLongCounter bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link LongCounter}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link LongCounter}. */
|
||||
@ThreadSafe
|
||||
interface BoundLongCounter extends SynchronousInstrument.BoundInstrument {
|
||||
|
||||
|
|
@ -80,7 +72,6 @@ public interface LongCounter extends SynchronousInstrument<BoundLongCounter> {
|
|||
* <p>The value added is associated with the current {@code Context}.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(long increment);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongSumObserver extends AsynchronousInstrument<LongResult> {
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongUpDownCounter extends SynchronousInstrument<BoundLongUpDownCounter> {
|
||||
|
|
@ -52,7 +50,6 @@ public interface LongUpDownCounter extends SynchronousInstrument<BoundLongUpDown
|
|||
*
|
||||
* @param increment the value to add.
|
||||
* @param labels the set of labels to be associated to this recording.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(long increment, Labels labels);
|
||||
|
||||
|
|
@ -62,18 +59,13 @@ public interface LongUpDownCounter extends SynchronousInstrument<BoundLongUpDown
|
|||
* <p>The value added is associated with the current {@code Context} and empty labels.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void add(long increment);
|
||||
|
||||
@Override
|
||||
BoundLongUpDownCounter bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link LongUpDownCounter}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link LongUpDownCounter}. */
|
||||
@ThreadSafe
|
||||
interface BoundLongUpDownCounter extends BoundInstrument {
|
||||
|
||||
|
|
@ -83,7 +75,6 @@ public interface LongUpDownCounter extends SynchronousInstrument<BoundLongUpDown
|
|||
* <p>The value added is associated with the current {@code Context}.
|
||||
*
|
||||
* @param increment the value to add.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void add(long increment);
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongUpDownSumObserver extends AsynchronousInstrument<LongResult> {
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.5.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongValueObserver extends AsynchronousInstrument<LongResult> {
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface LongValueRecorder extends SynchronousInstrument<BoundLongValueRecorder> {
|
||||
|
|
@ -61,7 +59,6 @@ public interface LongValueRecorder extends SynchronousInstrument<BoundLongValueR
|
|||
* @param value the measurement to record.
|
||||
* @param labels the set of labels to be associated to this recording
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
void record(long value, Labels labels);
|
||||
|
||||
|
|
@ -70,18 +67,13 @@ public interface LongValueRecorder extends SynchronousInstrument<BoundLongValueR
|
|||
*
|
||||
* @param value the measurement to record.
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void record(long value);
|
||||
|
||||
@Override
|
||||
BoundLongValueRecorder bind(Labels labels);
|
||||
|
||||
/**
|
||||
* A {@code Bound Instrument} for a {@link LongValueRecorder}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Bound Instrument} for a {@link LongValueRecorder}. */
|
||||
@ThreadSafe
|
||||
interface BoundLongValueRecorder extends SynchronousInstrument.BoundInstrument {
|
||||
/**
|
||||
|
|
@ -89,7 +81,6 @@ public interface LongValueRecorder extends SynchronousInstrument<BoundLongValueR
|
|||
*
|
||||
* @param value the measurement to record.
|
||||
* @throws IllegalArgumentException if value is negative.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void record(long value);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleCounter.Builder doubleCounterBuilder(String name);
|
||||
|
||||
|
|
@ -47,7 +46,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongCounter.Builder longCounterBuilder(String name);
|
||||
|
||||
|
|
@ -60,7 +58,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleUpDownCounter.Builder doubleUpDownCounterBuilder(String name);
|
||||
|
||||
|
|
@ -73,7 +70,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongUpDownCounter.Builder longUpDownCounterBuilder(String name);
|
||||
|
||||
|
|
@ -86,7 +82,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleValueRecorder.Builder doubleValueRecorderBuilder(String name);
|
||||
|
||||
|
|
@ -99,7 +94,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongValueRecorder.Builder longValueRecorderBuilder(String name);
|
||||
|
||||
|
|
@ -112,7 +106,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleSumObserver.Builder doubleSumObserverBuilder(String name);
|
||||
|
||||
|
|
@ -125,7 +118,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongSumObserver.Builder longSumObserverBuilder(String name);
|
||||
|
||||
|
|
@ -138,7 +130,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleUpDownSumObserver.Builder doubleUpDownSumObserverBuilder(String name);
|
||||
|
||||
|
|
@ -151,7 +142,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongUpDownSumObserver.Builder longUpDownSumObserverBuilder(String name);
|
||||
|
||||
|
|
@ -164,7 +154,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
DoubleValueObserver.Builder doubleValueObserverBuilder(String name);
|
||||
|
||||
|
|
@ -177,7 +166,6 @@ public interface Meter {
|
|||
* @throws NullPointerException if {@code name} is null.
|
||||
* @throws IllegalArgumentException if different metric with the same name already registered.
|
||||
* @throws IllegalArgumentException if the {@code name} does not match the requirements.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
LongValueObserver.Builder longValueObserverBuilder(String name);
|
||||
|
||||
|
|
@ -188,7 +176,6 @@ public interface Meter {
|
|||
* @param keyValuePairs The set of labels to associate with this recorder and all it's recordings.
|
||||
* @return a {@code MeasureBatchRecorder} that can be use to atomically record a set of
|
||||
* measurements associated with different Measures.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
BatchRecorder newBatchRecorder(String... keyValuePairs);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
*
|
||||
* @see io.opentelemetry.OpenTelemetry
|
||||
* @see io.opentelemetry.metrics.Meter
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface MeterProvider {
|
||||
|
|
@ -24,7 +23,6 @@ public interface MeterProvider {
|
|||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library.
|
||||
* @return a tracer instance.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Meter get(String instrumentationName);
|
||||
|
||||
|
|
@ -35,7 +33,6 @@ public interface MeterProvider {
|
|||
* instrument*ed* library.
|
||||
* @param instrumentationVersion The version of the instrumentation library.
|
||||
* @return a tracer instance.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Meter get(String instrumentationName, String instrumentationVersion);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* properties of the associated trace and distributed correlation values.
|
||||
*
|
||||
* @param <B> the specific type of Bound Instrument this instrument can provide.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface SynchronousInstrument<B extends BoundInstrument> extends Instrument {
|
||||
|
|
@ -31,7 +30,6 @@ public interface SynchronousInstrument<B extends BoundInstrument> extends Instru
|
|||
* @param labels the set of labels, as key-value pairs.
|
||||
* @return a {@code Bound Instrument}
|
||||
* @throws NullPointerException if {@code labelValues} is null.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
B bind(Labels labels);
|
||||
|
||||
|
|
@ -41,8 +39,6 @@ public interface SynchronousInstrument<B extends BoundInstrument> extends Instru
|
|||
*
|
||||
* <p>After this method returns the current instance {@code Bound} is considered invalid (not
|
||||
* being managed by the instrument).
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
void unbind();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ public interface MeterProviderFactory {
|
|||
* Creates a new meter registry instance.
|
||||
*
|
||||
* @return a meter factory instance.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
MeterProvider create();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* implementation is available. All operations are no-op except context propagation.
|
||||
*
|
||||
* <p>Used also to stop tracing, see {@link Tracer#withSpan}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
public final class DefaultSpan implements Span {
|
||||
|
|
@ -26,7 +24,6 @@ public final class DefaultSpan implements Span {
|
|||
* Returns a {@link DefaultSpan} with an invalid {@link SpanContext}.
|
||||
*
|
||||
* @return a {@code DefaultSpan} with an invalid {@code SpanContext}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Span getInvalid() {
|
||||
return INVALID;
|
||||
|
|
@ -37,7 +34,6 @@ public final class DefaultSpan implements Span {
|
|||
*
|
||||
* @param spanContext the {@code SpanContext}.
|
||||
* @return a {@link DefaultSpan}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Span create(SpanContext spanContext) {
|
||||
return new DefaultSpan(spanContext);
|
||||
|
|
|
|||
|
|
@ -14,11 +14,7 @@ import java.util.Objects;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.ThreadSafe;
|
||||
|
||||
/**
|
||||
* No-op implementations of {@link Tracer}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** No-op implementations of {@link Tracer}. */
|
||||
@ThreadSafe
|
||||
public final class DefaultTracer implements Tracer {
|
||||
private static final DefaultTracer INSTANCE = new DefaultTracer();
|
||||
|
|
@ -27,7 +23,6 @@ public final class DefaultTracer implements Tracer {
|
|||
* Returns a {@code Tracer} singleton that is the default implementations for {@link Tracer}.
|
||||
*
|
||||
* @return a {@code Tracer} singleton that is the default implementations for {@link Tracer}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Tracer getInstance() {
|
||||
return INSTANCE;
|
||||
|
|
|
|||
|
|
@ -11,19 +11,13 @@ import javax.annotation.concurrent.Immutable;
|
|||
/**
|
||||
* A class that enables overriding the default values used when ending a {@link Span}. Allows
|
||||
* overriding the endTimestamp.
|
||||
*
|
||||
* @since 0.1
|
||||
*/
|
||||
@Immutable
|
||||
@AutoValue
|
||||
public abstract class EndSpanOptions {
|
||||
private static final EndSpanOptions DEFAULT = builder().build();
|
||||
|
||||
/**
|
||||
* The default {@code EndSpanOptions}.
|
||||
*
|
||||
* @since 0.1
|
||||
*/
|
||||
/** The default {@code EndSpanOptions}. */
|
||||
static EndSpanOptions getDefault() {
|
||||
return DEFAULT;
|
||||
}
|
||||
|
|
@ -32,7 +26,6 @@ public abstract class EndSpanOptions {
|
|||
* Returns a new {@link Builder} with default options.
|
||||
*
|
||||
* @return a new {@code Builder} with default options.
|
||||
* @since 0.1
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new AutoValue_EndSpanOptions.Builder().setEndTimestamp(0);
|
||||
|
|
@ -44,15 +37,10 @@ public abstract class EndSpanOptions {
|
|||
* <p>Important this is NOT equivalent with System.nanoTime().
|
||||
*
|
||||
* @return the end timestamp.
|
||||
* @since 0.1
|
||||
*/
|
||||
public abstract long getEndTimestamp();
|
||||
|
||||
/**
|
||||
* Builder class for {@link EndSpanOptions}.
|
||||
*
|
||||
* @since 0.1
|
||||
*/
|
||||
/** Builder class for {@link EndSpanOptions}. */
|
||||
@AutoValue.Builder
|
||||
public abstract static class Builder {
|
||||
/**
|
||||
|
|
@ -62,7 +50,6 @@ public abstract class EndSpanOptions {
|
|||
*
|
||||
* @param endTimestamp the end timestamp in nanos since epoch.
|
||||
* @return this.
|
||||
* @since 0.1
|
||||
*/
|
||||
public abstract Builder setEndTimestamp(long endTimestamp);
|
||||
|
||||
|
|
@ -70,7 +57,6 @@ public abstract class EndSpanOptions {
|
|||
* Builds and returns a {@code EndSpanOptions} with the desired settings.
|
||||
*
|
||||
* @return a {@code EndSpanOptions} with the desired settings.
|
||||
* @since 0.1
|
||||
*/
|
||||
public abstract EndSpanOptions build();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* <p>Spans are created by the {@link Builder#startSpan} method.
|
||||
*
|
||||
* <p>{@code Span} <b>must</b> be ended by calling {@link #end()}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface Span {
|
||||
|
|
@ -26,28 +24,16 @@ public interface Span {
|
|||
/**
|
||||
* Type of span. Can be used to specify additional relationships between spans in addition to a
|
||||
* parent/child relationship.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
enum Kind {
|
||||
/**
|
||||
* Default value. Indicates that the span is used internally.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Default value. Indicates that the span is used internally. */
|
||||
INTERNAL,
|
||||
|
||||
/**
|
||||
* Indicates that the span covers server-side handling of an RPC or other remote request.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Indicates that the span covers server-side handling of an RPC or other remote request. */
|
||||
SERVER,
|
||||
|
||||
/**
|
||||
* Indicates that the span covers the client-side wrapper around an RPC or other remote request.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
CLIENT,
|
||||
|
||||
|
|
@ -55,8 +41,6 @@ public interface Span {
|
|||
* Indicates that the span describes producer sending a message to a broker. Unlike client and
|
||||
* server, there is no direct critical path latency relationship between producer and consumer
|
||||
* spans.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
PRODUCER,
|
||||
|
||||
|
|
@ -64,8 +48,6 @@ public interface Span {
|
|||
* Indicates that the span describes consumer receiving a message from a broker. Unlike client
|
||||
* and server, there is no direct critical path latency relationship between producer and
|
||||
* consumer spans.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
CONSUMER
|
||||
}
|
||||
|
|
@ -82,7 +64,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void setAttribute(String key, @Nonnull String value);
|
||||
|
||||
|
|
@ -95,7 +76,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void setAttribute(String key, long value);
|
||||
|
||||
|
|
@ -108,7 +88,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void setAttribute(String key, double value);
|
||||
|
||||
|
|
@ -121,7 +100,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void setAttribute(String key, boolean value);
|
||||
|
||||
|
|
@ -133,7 +111,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
<T> void setAttribute(AttributeKey<T> key, @Nonnull T value);
|
||||
|
||||
|
|
@ -143,7 +120,6 @@ public interface Span {
|
|||
*
|
||||
* @param key the key for this attribute.
|
||||
* @param value the value for this attribute.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
default void setAttribute(AttributeKey<Long> key, int value) {
|
||||
setAttribute(key, (long) value);
|
||||
|
|
@ -153,7 +129,6 @@ public interface Span {
|
|||
* Adds an event to the {@link Span}. The timestamp of the event will be the current time.
|
||||
*
|
||||
* @param name the name of the event.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void addEvent(String name);
|
||||
|
||||
|
|
@ -168,7 +143,6 @@ public interface Span {
|
|||
*
|
||||
* @param name the name of the event.
|
||||
* @param timestamp the explicit event timestamp in nanos since epoch.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void addEvent(String name, long timestamp);
|
||||
|
||||
|
|
@ -179,7 +153,6 @@ public interface Span {
|
|||
* @param name the name of the event.
|
||||
* @param attributes the attributes that will be added; these are associated with this event, not
|
||||
* the {@code Span} as for {@code setAttribute()}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void addEvent(String name, Attributes attributes);
|
||||
|
||||
|
|
@ -196,7 +169,6 @@ public interface Span {
|
|||
* @param attributes the attributes that will be added; these are associated with this event, not
|
||||
* the {@code Span} as for {@code setAttribute()}.
|
||||
* @param timestamp the explicit event timestamp in nanos since epoch.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void addEvent(String name, Attributes attributes, long timestamp);
|
||||
|
||||
|
|
@ -210,7 +182,6 @@ public interface Span {
|
|||
* previous calls.
|
||||
*
|
||||
* @param canonicalCode the {@link StatusCanonicalCode} to set.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
void setStatus(StatusCanonicalCode canonicalCode);
|
||||
|
||||
|
|
@ -225,7 +196,6 @@ public interface Span {
|
|||
*
|
||||
* @param canonicalCode the {@link StatusCanonicalCode} to set.
|
||||
* @param description the description of the {@code Status}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
void setStatus(StatusCanonicalCode canonicalCode, String description);
|
||||
|
||||
|
|
@ -237,7 +207,6 @@ public interface Span {
|
|||
* #recordException(Throwable, Attributes)} if you know that an exception is escaping.
|
||||
*
|
||||
* @param exception the {@link Throwable} to record.
|
||||
* @since 0.7.0
|
||||
*/
|
||||
void recordException(Throwable exception);
|
||||
|
||||
|
|
@ -246,7 +215,6 @@ public interface Span {
|
|||
*
|
||||
* @param exception the {@link Throwable} to record.
|
||||
* @param additionalAttributes the additional {@link Attributes} to record.
|
||||
* @since 0.8.0
|
||||
*/
|
||||
void recordException(Throwable exception, Attributes additionalAttributes);
|
||||
|
||||
|
|
@ -259,7 +227,6 @@ public interface Span {
|
|||
* implementation.
|
||||
*
|
||||
* @param name the {@code Span} name.
|
||||
* @since 0.1
|
||||
*/
|
||||
void updateName(String name);
|
||||
|
||||
|
|
@ -268,8 +235,6 @@ public interface Span {
|
|||
*
|
||||
* <p>Only the timing of the first end call for a given {@code Span} will be recorded, and
|
||||
* implementations are free to ignore all further calls.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void end();
|
||||
|
||||
|
|
@ -283,7 +248,6 @@ public interface Span {
|
|||
* explicit values are required, use {@link #end()}.
|
||||
*
|
||||
* @param endOptions the explicit {@link EndSpanOptions} for this {@code Span}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void end(EndSpanOptions endOptions);
|
||||
|
||||
|
|
@ -291,7 +255,6 @@ public interface Span {
|
|||
* Returns the {@code SpanContext} associated with this {@code Span}.
|
||||
*
|
||||
* @return the {@code SpanContext} associated with this {@code Span}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
SpanContext getContext();
|
||||
|
||||
|
|
@ -300,7 +263,6 @@ public interface Span {
|
|||
* #addEvent(String)}, {@link #setAttribute(String, long)}).
|
||||
*
|
||||
* @return {@code true} if this {@code Span} records tracing events.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
boolean isRecording();
|
||||
|
||||
|
|
@ -390,8 +352,6 @@ public interface Span {
|
|||
*
|
||||
* <p>If your Java version is less than Java SE 7, see {@link Builder#startSpan} for usage
|
||||
* examples.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
interface Builder {
|
||||
|
||||
|
|
@ -408,7 +368,6 @@ public interface Span {
|
|||
* @param context the {@code Context}.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code context} is {@code null}.
|
||||
* @since 0.7.0
|
||||
*/
|
||||
Builder setParent(Context context);
|
||||
|
||||
|
|
@ -419,7 +378,6 @@ public interface Span {
|
|||
* <p>Observe that any previously set parent will be discarded.
|
||||
*
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Builder setNoParent();
|
||||
|
||||
|
|
@ -433,7 +391,6 @@ public interface Span {
|
|||
* @param spanContext the context of the linked {@code Span}.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code spanContext} is {@code null}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Builder addLink(SpanContext spanContext);
|
||||
|
||||
|
|
@ -449,7 +406,6 @@ public interface Span {
|
|||
* @return this.
|
||||
* @throws NullPointerException if {@code spanContext} is {@code null}.
|
||||
* @throws NullPointerException if {@code attributes} is {@code null}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Builder addLink(SpanContext spanContext, Attributes attributes);
|
||||
|
||||
|
|
@ -467,7 +423,6 @@ public interface Span {
|
|||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
Builder setAttribute(String key, @Nonnull String value);
|
||||
|
||||
|
|
@ -482,7 +437,6 @@ public interface Span {
|
|||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
Builder setAttribute(String key, long value);
|
||||
|
||||
|
|
@ -497,7 +451,6 @@ public interface Span {
|
|||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
Builder setAttribute(String key, double value);
|
||||
|
||||
|
|
@ -512,7 +465,6 @@ public interface Span {
|
|||
* @param value the value for this attribute.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
Builder setAttribute(String key, boolean value);
|
||||
|
||||
|
|
@ -527,7 +479,6 @@ public interface Span {
|
|||
* @return this.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
* @throws NullPointerException if {@code value} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
<T> Builder setAttribute(AttributeKey<T> key, @Nonnull T value);
|
||||
|
||||
|
|
@ -537,7 +488,6 @@ public interface Span {
|
|||
*
|
||||
* @param spanKind the kind of the newly created {@code Span}.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Builder setSpanKind(Span.Kind spanKind);
|
||||
|
||||
|
|
@ -552,7 +502,6 @@ public interface Span {
|
|||
* @param startTimestamp the explicit start timestamp of the newly created {@code Span} in nanos
|
||||
* since epoch.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Builder setStartTimestamp(long startTimestamp);
|
||||
|
||||
|
|
@ -587,7 +536,6 @@ public interface Span {
|
|||
* }</pre>
|
||||
*
|
||||
* @return the newly created {@code Span}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Span startSpan();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* trace_id} and {@link SpanId span_id}) associated with the {@link Span} and a set of options
|
||||
* (currently only whether the context is sampled or not), as well as the {@link TraceState
|
||||
* traceState} and the {@link boolean remote} flag.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
@AutoValue
|
||||
|
|
@ -46,7 +44,6 @@ public abstract class SpanContext {
|
|||
* @param traceFlags the byte representation of the {@link TraceFlags}
|
||||
* @param traceState the trace state for the span context.
|
||||
* @return a new {@code SpanContext} with the given identifiers and options.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static SpanContext create(
|
||||
String traceIdHex, String spanIdHex, byte traceFlags, TraceState traceState) {
|
||||
|
|
@ -68,7 +65,6 @@ public abstract class SpanContext {
|
|||
* @param traceFlags the byte representation of the {@link TraceFlags}
|
||||
* @param traceState the trace state for the span context.
|
||||
* @return a new {@code SpanContext} with the given identifiers and options.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static SpanContext createFromRemoteParent(
|
||||
String traceIdHex, String spanIdHex, byte traceFlags, TraceState traceState) {
|
||||
|
|
@ -83,7 +79,6 @@ public abstract class SpanContext {
|
|||
* Returns the trace identifier associated with this {@code SpanContext}.
|
||||
*
|
||||
* @return the trace identifier associated with this {@code SpanContext}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public String getTraceIdAsHexString() {
|
||||
return getTraceIdHex();
|
||||
|
|
@ -92,8 +87,6 @@ public abstract class SpanContext {
|
|||
/**
|
||||
* Returns the byte[] representation of the trace identifier associated with this {@link
|
||||
* SpanContext}.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@Memoized
|
||||
public byte[] getTraceIdBytes() {
|
||||
|
|
@ -104,7 +97,6 @@ public abstract class SpanContext {
|
|||
* Returns the span identifier associated with this {@code SpanContext}.
|
||||
*
|
||||
* @return the span identifier associated with this {@code SpanContext}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public String getSpanIdAsHexString() {
|
||||
return getSpanIdHex();
|
||||
|
|
@ -113,8 +105,6 @@ public abstract class SpanContext {
|
|||
/**
|
||||
* Returns the byte[] representation of the span identifier associated with this {@link
|
||||
* SpanContext}.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
@Memoized
|
||||
public byte[] getSpanIdBytes() {
|
||||
|
|
@ -138,7 +128,6 @@ public abstract class SpanContext {
|
|||
* Returns the {@code TraceState} associated with this {@code SpanContext}.
|
||||
*
|
||||
* @return the {@code TraceState} associated with this {@code SpanContext}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract TraceState getTraceState();
|
||||
|
||||
|
|
@ -146,7 +135,6 @@ public abstract class SpanContext {
|
|||
* Returns {@code true} if this {@code SpanContext} is valid.
|
||||
*
|
||||
* @return {@code true} if this {@code SpanContext} is valid.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Memoized
|
||||
public boolean isValid() {
|
||||
|
|
@ -157,7 +145,6 @@ public abstract class SpanContext {
|
|||
* Returns {@code true} if the {@code SpanContext} was propagated from a remote parent.
|
||||
*
|
||||
* @return {@code true} if the {@code SpanContext} was propagated from a remote parent.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract boolean isRemote();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* Helper methods for dealing with a span identifier. A valid span identifier is an 8-byte array
|
||||
* with at least one non-zero byte. In base-16 representation, a 16 character hex String, where at
|
||||
* least one of the characters is not a '0'.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
public final class SpanId {
|
||||
|
|
@ -29,17 +27,12 @@ public final class SpanId {
|
|||
* Returns the size in bytes of the {@code SpanId}.
|
||||
*
|
||||
* @return the size in bytes of the {@code SpanId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static int getSize() {
|
||||
return SIZE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the length of the base16 (hex) representation of the {@code SpanId}.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
/** Returns the length of the base16 (hex) representation of the {@code SpanId}. */
|
||||
public static int getHexLength() {
|
||||
return HEX_SIZE;
|
||||
}
|
||||
|
|
@ -48,7 +41,6 @@ public final class SpanId {
|
|||
* Returns the invalid {@code SpanId}. All bytes are 0.
|
||||
*
|
||||
* @return the invalid {@code SpanId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static String getInvalid() {
|
||||
return INVALID;
|
||||
|
|
@ -80,7 +72,6 @@ public final class SpanId {
|
|||
* @throws NullPointerException if {@code src} is null.
|
||||
* @throws IllegalArgumentException if not enough characters in the {@code src} from the {@code
|
||||
* srcOffset}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static byte[] bytesFromHex(String src, int srcOffset) {
|
||||
return BigendianEncoding.bytesFromBase16(src, srcOffset, HEX_SIZE);
|
||||
|
|
@ -91,7 +82,6 @@ public final class SpanId {
|
|||
* at least one non-zero byte.
|
||||
*
|
||||
* @return {@code true} if the span identifier is valid.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static boolean isValid(String spanId) {
|
||||
return (spanId.length() == HEX_SIZE)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ package io.opentelemetry.trace;
|
|||
/**
|
||||
* The set of canonical status codes. If new codes are added over time they must choose a numerical
|
||||
* value that does not collide with any previously used value.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public enum StatusCanonicalCode {
|
||||
|
||||
|
|
@ -35,7 +33,6 @@ public enum StatusCanonicalCode {
|
|||
* Returns the numerical value of the code.
|
||||
*
|
||||
* @return the numerical value of the code.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public int value() {
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* Helper methods for dealing with trace flags 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.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
public final class TraceFlags {
|
||||
|
|
@ -26,11 +24,7 @@ public final class TraceFlags {
|
|||
private static final int SIZE = 1;
|
||||
private static final int BASE16_SIZE = 2 * SIZE;
|
||||
|
||||
/**
|
||||
* Returns the size in Hex of trace flags.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
/** Returns the size in Hex of trace flags. */
|
||||
public static int getHexLength() {
|
||||
return BASE16_SIZE;
|
||||
}
|
||||
|
|
@ -39,7 +33,6 @@ public final class TraceFlags {
|
|||
* Returns the default {@code TraceFlags}.
|
||||
*
|
||||
* @return the default {@code TraceFlags}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static byte getDefault() {
|
||||
return DEFAULT;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* Helper methods for dealing with a trace identifier. A valid trace identifier is a 16-byte array
|
||||
* with at least one non-zero byte. In base-16 representation, a 32 character hex String, where at
|
||||
* least one of the characters is not a '0'.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
public final class TraceId {
|
||||
|
|
@ -29,17 +27,12 @@ public final class TraceId {
|
|||
* Returns the size in bytes of the {@code TraceId}.
|
||||
*
|
||||
* @return the size in bytes of the {@code TraceId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static int getSize() {
|
||||
return SIZE_IN_BYTES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the length of the base16 (hex) representation of the {@code TraceId}.
|
||||
*
|
||||
* @since 0.8.0
|
||||
*/
|
||||
/** Returns the length of the base16 (hex) representation of the {@code TraceId}. */
|
||||
public static int getHexLength() {
|
||||
return HEX_SIZE;
|
||||
}
|
||||
|
|
@ -48,7 +41,6 @@ public final class TraceId {
|
|||
* Returns the invalid {@code TraceId}. All bytes are '\0'.
|
||||
*
|
||||
* @return the invalid {@code TraceId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static String getInvalid() {
|
||||
return INVALID;
|
||||
|
|
@ -67,7 +59,6 @@ public final class TraceId {
|
|||
*
|
||||
* @param idHi the higher part of the {@code TraceId}.
|
||||
* @param idLo the lower part of the {@code TraceId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static String fromLongs(long idHi, long idLo) {
|
||||
char[] chars = getTemporaryBuffer();
|
||||
|
|
@ -95,7 +86,6 @@ public final class TraceId {
|
|||
* @throws NullPointerException if {@code src} is null.
|
||||
* @throws IllegalArgumentException if not enough characters in the {@code src} from the {@code
|
||||
* srcOffset}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static byte[] bytesFromHex(String src, int srcOffset) {
|
||||
Objects.requireNonNull(src, "src");
|
||||
|
|
@ -110,7 +100,6 @@ public final class TraceId {
|
|||
* @param destOffset the starting offset in the destination buffer.
|
||||
* @throws IndexOutOfBoundsException if {@code destOffset + 2 * TraceId.getSize()} is greater than
|
||||
* {@code dest.length}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static void copyHexInto(byte[] traceId, char[] dest, int destOffset) {
|
||||
BigendianEncoding.longToBase16String(
|
||||
|
|
@ -124,7 +113,6 @@ public final class TraceId {
|
|||
* at least one non-zero byte.
|
||||
*
|
||||
* @return {@code true} if the {@code TraceId} is valid.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static boolean isValid(CharSequence traceId) {
|
||||
return (traceId.length() == HEX_SIZE)
|
||||
|
|
@ -136,7 +124,6 @@ public final class TraceId {
|
|||
* Returns the lowercase base16 encoding of this {@code TraceId}.
|
||||
*
|
||||
* @return the lowercase base16 encoding of this {@code TraceId}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static String bytesToHex(byte[] traceId) {
|
||||
char[] chars = new char[HEX_SIZE];
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
*
|
||||
* <p>Value is opaque string up to 256 characters printable ASCII RFC0020 characters (i.e., the
|
||||
* range 0x20 to 0x7E) except comma , and =.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
@AutoValue
|
||||
|
|
@ -43,7 +41,6 @@ public abstract class TraceState {
|
|||
* Returns the default {@code TraceState} with no entries.
|
||||
*
|
||||
* @return the default {@code TraceState}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static TraceState getDefault() {
|
||||
return DEFAULT;
|
||||
|
|
@ -56,7 +53,6 @@ public abstract class TraceState {
|
|||
* @param key with which the specified value is to be associated
|
||||
* @return the value to which the specified key is mapped, or null if this map contains no mapping
|
||||
* for the key.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Nullable
|
||||
public String get(String key) {
|
||||
|
|
@ -72,7 +68,6 @@ public abstract class TraceState {
|
|||
* Returns a {@link List} view of the mappings contained in this {@code TraceState}.
|
||||
*
|
||||
* @return a {@link List} view of the mappings contained in this {@code TraceState}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract List<Entry> getEntries();
|
||||
|
||||
|
|
@ -80,7 +75,6 @@ public abstract class TraceState {
|
|||
* Returns a {@code Builder} based on an empty {@code TraceState}.
|
||||
*
|
||||
* @return a {@code Builder} based on an empty {@code TraceState}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new Builder(Builder.EMPTY);
|
||||
|
|
@ -90,17 +84,12 @@ public abstract class TraceState {
|
|||
* Returns a {@code Builder} based on this {@code TraceState}.
|
||||
*
|
||||
* @return a {@code Builder} based on this {@code TraceState}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public Builder toBuilder() {
|
||||
return new Builder(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder class for {@link TraceState}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Builder class for {@link TraceState}. */
|
||||
public static final class Builder {
|
||||
private final TraceState parent;
|
||||
@Nullable private ArrayList<Entry> entries;
|
||||
|
|
@ -122,7 +111,6 @@ public abstract class TraceState {
|
|||
* @param key the key for the {@code Entry} to be added.
|
||||
* @param value the value for the {@code Entry} to be added.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public Builder set(String key, String value) {
|
||||
// Initially create the Entry to validate input.
|
||||
|
|
@ -148,7 +136,6 @@ public abstract class TraceState {
|
|||
*
|
||||
* @param key the key for the {@code Entry} to be removed.
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public Builder remove(String key) {
|
||||
Objects.requireNonNull(key, "key");
|
||||
|
|
@ -171,7 +158,6 @@ public abstract class TraceState {
|
|||
* and removing duplicate entries.
|
||||
*
|
||||
* @return a TraceState with the new entries.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public TraceState build() {
|
||||
if (entries == null) {
|
||||
|
|
@ -181,11 +167,7 @@ public abstract class TraceState {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Immutable key-value pair for {@code TraceState}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Immutable key-value pair for {@code TraceState}. */
|
||||
@Immutable
|
||||
@AutoValue
|
||||
public abstract static class Entry {
|
||||
|
|
@ -195,7 +177,6 @@ public abstract class TraceState {
|
|||
* @param key the Entry's key.
|
||||
* @param value the Entry's value.
|
||||
* @return the new {@code Entry}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Entry create(String key, String value) {
|
||||
Objects.requireNonNull(key, "key");
|
||||
|
|
@ -209,7 +190,6 @@ public abstract class TraceState {
|
|||
* Returns the key {@code String}.
|
||||
*
|
||||
* @return the key {@code String}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract String getKey();
|
||||
|
||||
|
|
@ -217,7 +197,6 @@ public abstract class TraceState {
|
|||
* Returns the value {@code String}.
|
||||
*
|
||||
* @return the value {@code String}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract String getValue();
|
||||
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface Tracer {
|
||||
|
|
@ -71,7 +69,6 @@ public interface Tracer {
|
|||
* @return a default {@code Span} that does nothing and has an invalid {@link SpanContext} if no
|
||||
* {@code Span} is associated with the current Context, otherwise the current {@code Span}
|
||||
* from the Context.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Span getCurrentSpan();
|
||||
|
||||
|
|
@ -123,7 +120,6 @@ public interface Tracer {
|
|||
* @return an object that defines a scope where the given {@link Span} will be set to the current
|
||||
* Context.
|
||||
* @throws NullPointerException if {@code span} is {@code null}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@MustBeClosed
|
||||
Scope withSpan(Span span);
|
||||
|
|
@ -136,7 +132,6 @@ public interface Tracer {
|
|||
* @param spanName The name of the returned Span.
|
||||
* @return a {@code Span.Builder} to create and start a new {@code Span}.
|
||||
* @throws NullPointerException if {@code spanName} is {@code null}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Span.Builder spanBuilder(String spanName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
*
|
||||
* @see io.opentelemetry.OpenTelemetry
|
||||
* @see io.opentelemetry.trace.Tracer
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface TracerProvider {
|
||||
|
|
@ -25,7 +24,6 @@ public interface TracerProvider {
|
|||
* @param instrumentationName The name of the instrumentation library, not the name of the
|
||||
* instrument*ed* library (e.g., "io.opentelemetry.contrib.mongodb"). Must not be null.
|
||||
* @return a tracer instance.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Tracer get(String instrumentationName);
|
||||
|
||||
|
|
@ -37,7 +35,6 @@ public interface TracerProvider {
|
|||
* @param instrumentationVersion The version of the instrumentation library (e.g.,
|
||||
* "semver:1.0.0").
|
||||
* @return a tracer instance.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Tracer get(String instrumentationName, String instrumentationVersion);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ import io.opentelemetry.context.Scope;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* Util methods/functionality to interact with the {@link Context}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Util methods/functionality to interact with the {@link Context}. */
|
||||
@Immutable
|
||||
public final class TracingContextUtils {
|
||||
private static final ContextKey<Span> CONTEXT_SPAN_KEY =
|
||||
|
|
@ -27,7 +23,6 @@ public final class TracingContextUtils {
|
|||
* @param span the value to be set.
|
||||
* @param context the parent {@code Context}.
|
||||
* @return a new context with the given value set.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Context withSpan(Span span, Context context) {
|
||||
return context.withValues(CONTEXT_SPAN_KEY, span);
|
||||
|
|
@ -38,7 +33,6 @@ public final class TracingContextUtils {
|
|||
* {@link Span}.
|
||||
*
|
||||
* @return the {@link Span} from the current {@code Context}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static Span getCurrentSpan() {
|
||||
return getSpan(io.opentelemetry.context.Context.current());
|
||||
|
|
@ -50,7 +44,6 @@ public final class TracingContextUtils {
|
|||
*
|
||||
* @param context the specified {@code Context}.
|
||||
* @return the {@link Span} from the specified {@code Context}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static Span getSpan(Context context) {
|
||||
Span span = context.getValue(CONTEXT_SPAN_KEY);
|
||||
|
|
@ -63,7 +56,6 @@ public final class TracingContextUtils {
|
|||
*
|
||||
* @param context the specified {@code Context}.
|
||||
* @return the {@link Span} from the specified {@code Context}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Nullable
|
||||
public static Span getSpanWithoutDefault(Context context) {
|
||||
|
|
@ -76,7 +68,6 @@ public final class TracingContextUtils {
|
|||
*
|
||||
* @param span the {@link Span} to be added to the current {@code Context}.
|
||||
* @return the {@link Scope} for the updated {@code Context}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Scope currentContextWith(Span span) {
|
||||
return withSpan(span, io.opentelemetry.context.Context.current()).makeCurrent();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ public interface TracerProviderFactory {
|
|||
* Creates a new TracerProvider.
|
||||
*
|
||||
* @return a new TracerProvider.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
TracerProvider create();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface ContextPropagators {
|
||||
|
|
@ -80,7 +78,6 @@ public interface ContextPropagators {
|
|||
* instance.
|
||||
*
|
||||
* @return the {@link TextMapPropagator} propagator to inject and extract data.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
TextMapPropagator getTextMapPropagator();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ import java.util.Set;
|
|||
* synchronically upon injection and extraction.
|
||||
*
|
||||
* <p>The propagation fields retrieved from all registered propagators are de-duplicated.
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public final class DefaultContextPropagators implements ContextPropagators {
|
||||
private final TextMapPropagator textMapPropagator;
|
||||
|
|
@ -36,7 +34,6 @@ public final class DefaultContextPropagators implements ContextPropagators {
|
|||
* object.
|
||||
*
|
||||
* @return a {@link DefaultContextPropagators.Builder}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
|
|
@ -59,8 +56,6 @@ public final class DefaultContextPropagators implements ContextPropagators {
|
|||
* .addTextMapPropagator(new MyCustomContextPropagator())
|
||||
* .build();
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public static final class Builder {
|
||||
List<TextMapPropagator> textPropagators = new ArrayList<>();
|
||||
|
|
@ -74,7 +69,6 @@ public final class DefaultContextPropagators implements ContextPropagators {
|
|||
* @param textMapPropagator the propagator to be added.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code textMapPropagator} is {@code null}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public Builder addTextMapPropagator(TextMapPropagator textMapPropagator) {
|
||||
if (textMapPropagator == null) {
|
||||
|
|
@ -89,7 +83,6 @@ public final class DefaultContextPropagators implements ContextPropagators {
|
|||
* Builds a new {@code ContextPropagators} with the specified propagators.
|
||||
*
|
||||
* @return the newly created {@code ContextPropagators} instance.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public ContextPropagators build() {
|
||||
if (textPropagators.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ import javax.annotation.concurrent.ThreadSafe;
|
|||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@ThreadSafe
|
||||
public interface TextMapPropagator {
|
||||
|
|
@ -50,7 +48,6 @@ public interface TextMapPropagator {
|
|||
* successive calls should clear these fields first.
|
||||
*
|
||||
* @return list of fields that will be used by this formatter.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
// The use cases of this are:
|
||||
// * allow pre-allocation of fields, especially in systems like gRPC Metadata
|
||||
|
|
@ -66,7 +63,6 @@ public interface TextMapPropagator {
|
|||
* @param carrier holds propagation fields. For example, an outgoing message or http request.
|
||||
* @param setter invoked for each propagation key to add or remove.
|
||||
* @param <C> carrier of propagation fields, such as an http request
|
||||
* @since 0.1.0
|
||||
*/
|
||||
<C> void inject(Context context, @Nullable C carrier, Setter<C> setter);
|
||||
|
||||
|
|
@ -77,7 +73,6 @@ public interface TextMapPropagator {
|
|||
* allocations.
|
||||
*
|
||||
* @param <C> carrier of propagation fields, such as an http request
|
||||
* @since 0.1.0
|
||||
*/
|
||||
interface Setter<C> {
|
||||
|
||||
|
|
@ -91,7 +86,6 @@ public interface TextMapPropagator {
|
|||
* facilitate implementations as java lambdas, this parameter may be null.
|
||||
* @param key the key of the field.
|
||||
* @param value the value of the field.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
void set(@Nullable C carrier, String key, String value);
|
||||
}
|
||||
|
|
@ -108,7 +102,6 @@ public interface TextMapPropagator {
|
|||
* @param getter invoked for each propagation key to get.
|
||||
* @param <C> carrier of propagation fields, such as an http request.
|
||||
* @return the {@code Context} containing the extracted value.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
<C> Context extract(Context context, C carrier, Getter<C> getter);
|
||||
|
||||
|
|
@ -119,7 +112,6 @@ public interface TextMapPropagator {
|
|||
* allocations.
|
||||
*
|
||||
* @param <C> carrier of propagation fields, such as an http request.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
interface Getter<C> {
|
||||
|
||||
|
|
@ -129,7 +121,6 @@ public interface TextMapPropagator {
|
|||
* @param carrier carrier of propagation fields, such as an http request.
|
||||
* @param key the key of the field.
|
||||
* @return the first value of the given propagation {@code key} or returns {@code null}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Nullable
|
||||
String get(C carrier, String key);
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* assertThat(spans.get(0).getName()).isEqualTo("span");
|
||||
* }
|
||||
* </code></pre>
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@AutoValue
|
||||
@Immutable
|
||||
|
|
@ -44,7 +42,6 @@ public abstract class InMemoryTracing {
|
|||
* Returns the {@code TracerSdkManagement} passed during construction.
|
||||
*
|
||||
* @return the {@code TracerSdkManagement} passed during construction.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
abstract TracerSdkManagement getTracerSdkManagement();
|
||||
|
||||
|
|
@ -52,7 +49,6 @@ public abstract class InMemoryTracing {
|
|||
* Returns the installed {@link InMemorySpanExporter}.
|
||||
*
|
||||
* @return the installed {@link InMemorySpanExporter}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract InMemorySpanExporter getSpanExporter();
|
||||
|
||||
|
|
@ -65,11 +61,7 @@ public abstract class InMemoryTracing {
|
|||
return new AutoValue_InMemoryTracing.Builder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder for {@link InMemoryTracing}.
|
||||
*
|
||||
* @since 0.3.0
|
||||
*/
|
||||
/** Builder for {@link InMemoryTracing}. */
|
||||
@AutoValue.Builder
|
||||
public abstract static class Builder {
|
||||
public abstract Builder setTracerSdkManagement(TracerSdkManagement tracerSdkManagement);
|
||||
|
|
@ -84,7 +76,6 @@ public abstract class InMemoryTracing {
|
|||
* Builds a new {@link InMemoryTracing} with current settings.
|
||||
*
|
||||
* @return a {@code InMemoryTracing}.
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public final InMemoryTracing build() {
|
||||
// install the HttpTraceContext propagator into the API for testing with.
|
||||
|
|
|
|||
|
|
@ -213,7 +213,6 @@ public final class JaegerGrpcSpanExporter implements SpanExporter {
|
|||
*
|
||||
* @param endpoint The Jaeger endpoint URL, ex. "jaegerhost:14250".
|
||||
* @return this.
|
||||
* @since 0.7.0
|
||||
*/
|
||||
public Builder setEndpoint(String endpoint) {
|
||||
this.endpoint = endpoint;
|
||||
|
|
@ -236,7 +235,6 @@ public final class JaegerGrpcSpanExporter implements SpanExporter {
|
|||
*
|
||||
* @param configMap {@link Map} holding the configuration values.
|
||||
* @return this.
|
||||
* @since 0.7.0
|
||||
*/
|
||||
@Override
|
||||
protected Builder fromConfigMap(
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ public final class OtlpGrpcMetricExporter implements MetricExporter {
|
|||
* environment. If a configuration value is missing, it uses the default value.
|
||||
*
|
||||
* @return a new {@link OtlpGrpcMetricExporter} instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static OtlpGrpcMetricExporter getDefault() {
|
||||
return builder().readEnvironmentVariables().readSystemProperties().build();
|
||||
|
|
|
|||
|
|
@ -154,7 +154,6 @@ public final class OtlpGrpcSpanExporter implements SpanExporter {
|
|||
* environment. If a configuration value is missing, it uses the default value.
|
||||
*
|
||||
* @return a new {@link OtlpGrpcSpanExporter} instance.
|
||||
* @since 0.5.0
|
||||
*/
|
||||
public static OtlpGrpcSpanExporter getDefault() {
|
||||
return builder().readEnvironmentVariables().readSystemProperties().build();
|
||||
|
|
|
|||
|
|
@ -314,7 +314,6 @@ public final class ZipkinSpanExporter implements SpanExporter {
|
|||
* @return this.
|
||||
* @see io.opentelemetry.sdk.resources.Resource
|
||||
* @see io.opentelemetry.sdk.resources.ResourceAttributes
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public Builder setServiceName(String serviceName) {
|
||||
this.serviceName = serviceName;
|
||||
|
|
@ -329,7 +328,6 @@ public final class ZipkinSpanExporter implements SpanExporter {
|
|||
*
|
||||
* @param sender the Zipkin sender implementation.
|
||||
* @return this.
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public Builder setSender(Sender sender) {
|
||||
this.sender = sender;
|
||||
|
|
@ -343,7 +341,6 @@ public final class ZipkinSpanExporter implements SpanExporter {
|
|||
* @param encoder the {@code BytesEncoder} to use.
|
||||
* @return this.
|
||||
* @see SpanBytesEncoder
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public Builder setEncoder(BytesEncoder<Span> encoder) {
|
||||
this.encoder = encoder;
|
||||
|
|
@ -357,7 +354,6 @@ public final class ZipkinSpanExporter implements SpanExporter {
|
|||
* @param endpoint The Zipkin endpoint URL, ex. "http://zipkinhost:9411/api/v2/spans".
|
||||
* @return this.
|
||||
* @see OkHttpSender
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public Builder setEndpoint(String endpoint) {
|
||||
this.endpoint = endpoint;
|
||||
|
|
@ -389,7 +385,6 @@ public final class ZipkinSpanExporter implements SpanExporter {
|
|||
* Builds a {@link ZipkinSpanExporter}.
|
||||
*
|
||||
* @return a {@code ZipkinSpanExporter}.
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public ZipkinSpanExporter build() {
|
||||
if (sender == null) {
|
||||
|
|
|
|||
|
|
@ -47,8 +47,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* Context context = OpenTelemetry.getPropagators().getTextMapPropagator()
|
||||
* .extract(context, carrier, carrierGetter);
|
||||
* }</pre>
|
||||
*
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@Immutable
|
||||
public class TraceMultiPropagator implements TextMapPropagator {
|
||||
|
|
@ -71,7 +69,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* object.
|
||||
*
|
||||
* @return a {@link TraceMultiPropagator.Builder}.
|
||||
* @since 0.6.0
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
|
|
@ -82,7 +79,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* read-only.
|
||||
*
|
||||
* @return list of fields defined in all the registered propagators.
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@Override
|
||||
public List<String> fields() {
|
||||
|
|
@ -97,7 +93,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* @param carrier holds propagation fields. For example, an outgoing message or http request.
|
||||
* @param setter invoked for each propagation key to add or remove.
|
||||
* @param <C> carrier of propagation fields, such as an http request
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@Override
|
||||
public <C> void inject(Context context, C carrier, Setter<C> setter) {
|
||||
|
|
@ -116,7 +111,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* @param getter invoked for each propagation key to get.
|
||||
* @param <C> carrier of propagation fields, such as an http request.
|
||||
* @return the {@code Context} containing the extracted value.
|
||||
* @since 0.6.0
|
||||
*/
|
||||
@Override
|
||||
public <C> Context extract(Context context, C carrier, Getter<C> getter) {
|
||||
|
|
@ -137,8 +131,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
/**
|
||||
* {@link Builder} is used to construct a new {@code TraceMultiPropagator} object with the
|
||||
* specified propagators.
|
||||
*
|
||||
* @since 0.6.0
|
||||
*/
|
||||
public static class Builder {
|
||||
private final List<TextMapPropagator> propagators;
|
||||
|
|
@ -156,7 +148,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* @param propagator the propagator to be added.
|
||||
* @return this.
|
||||
* @throws NullPointerException if {@code propagator} is {@code null}.
|
||||
* @since 0.6.0
|
||||
*/
|
||||
public Builder addPropagator(TextMapPropagator propagator) {
|
||||
Objects.requireNonNull(propagator, "propagator");
|
||||
|
|
@ -169,7 +160,6 @@ public class TraceMultiPropagator implements TextMapPropagator {
|
|||
* Builds a new {@code TraceMultiPropagator} with the specified propagators.
|
||||
*
|
||||
* @return the newly created {@code TraceMultiPropagator} instance.
|
||||
* @since 0.6.0
|
||||
*/
|
||||
public TraceMultiPropagator build() {
|
||||
return new TraceMultiPropagator(propagators);
|
||||
|
|
|
|||
|
|
@ -20,8 +20,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
*
|
||||
* <p>It requires a {@link Type type} and a message id that serves to uniquely identify each
|
||||
* message. It can optionally have information about the message size.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
public final class MessageEvent {
|
||||
|
|
@ -32,23 +30,11 @@ public final class MessageEvent {
|
|||
private static final AttributeKey<Long> COMPRESSED_SIZE = longKey("message.compressed_size");
|
||||
private static final AttributeKey<Long> UNCOMPRESSED_SIZE = longKey("message.uncompressed_size");
|
||||
|
||||
/**
|
||||
* Available types for a {@code MessageEvent}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** Available types for a {@code MessageEvent}. */
|
||||
public enum Type {
|
||||
/**
|
||||
* When the message was sent.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** When the message was sent. */
|
||||
SENT,
|
||||
/**
|
||||
* When the message was received.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** When the message was received. */
|
||||
RECEIVED,
|
||||
}
|
||||
|
||||
|
|
@ -62,7 +48,6 @@ public final class MessageEvent {
|
|||
* available use 0.
|
||||
* @param compressedSize represents the compressed size in bytes of this message. If not available
|
||||
* use 0.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static void record(
|
||||
Span span, Type type, long messageId, long uncompressedSize, long compressedSize) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ public final class TraceShim {
|
|||
* {@code OpenTelemetry.getBaggageManager()}.
|
||||
*
|
||||
* @return a {@code io.opentracing.Tracer}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static io.opentracing.Tracer createTracerShim() {
|
||||
return new TracerShim(
|
||||
|
|
@ -36,7 +35,6 @@ public final class TraceShim {
|
|||
* @param tracerProvider the {@code TracerProvider} used by this shim.
|
||||
* @param contextManager the {@code BaggageManager} used by this shim.
|
||||
* @return a {@code io.opentracing.Tracer}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static io.opentracing.Tracer createTracerShim(
|
||||
TracerProvider tracerProvider, BaggageManager contextManager) {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ public abstract class ResourcesConfig {
|
|||
* Returns the default {@code ResourcesConfig}.
|
||||
*
|
||||
* @return the default {@code ResourcesConfig}.
|
||||
* @since 0.9.0
|
||||
*/
|
||||
public static ResourcesConfig getDefault() {
|
||||
return DEFAULT;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ public final class IntervalMetricReader {
|
|||
* the environment. If a configuration value is missing, it uses the default value.
|
||||
*
|
||||
* @return a new {@link Builder} for {@link IntervalMetricReader}.
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public static Builder builderFromDefaultSources() {
|
||||
return builder().readEnvironmentVariables().readSystemProperties();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ abstract class ImmutableStatus implements SpanData.Status {
|
|||
*
|
||||
* @param description the new description of the {@code Status}.
|
||||
* @return The newly created {@code Status} with the given description.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static SpanData.Status create(
|
||||
StatusCanonicalCode canonicalCode, @Nullable String description) {
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ public interface SpanData {
|
|||
* Returns the {@code SpanContext}.
|
||||
*
|
||||
* @return the {@code SpanContext}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
SpanContext getContext();
|
||||
|
||||
|
|
@ -225,7 +224,6 @@ public interface SpanData {
|
|||
* Returns the set of attributes.
|
||||
*
|
||||
* @return the set of attributes.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Attributes getAttributes();
|
||||
|
||||
|
|
@ -272,7 +270,6 @@ public interface SpanData {
|
|||
* Return the name of the {@code Event}.
|
||||
*
|
||||
* @return the name of the {@code Event}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
String getName();
|
||||
|
||||
|
|
@ -280,7 +277,6 @@ public interface SpanData {
|
|||
* Return the attributes of the {@code Event}.
|
||||
*
|
||||
* @return the attributes of the {@code Event}.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
Attributes getAttributes();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
* types of values: {@code String}, {@code boolean}, {@code int}, {@code double}, {@code array}, or
|
||||
* {@code kvlist}. represented through {@code AnyValue.Type}. A {@code array} or a {@code kvlist}
|
||||
* can in turn hold other {@code AnyValue} instances, allowing for mapping to JSON-like structures.
|
||||
*
|
||||
* @since 0.9.0
|
||||
*/
|
||||
@Immutable
|
||||
public abstract class AnyValue {
|
||||
|
|
|
|||
|
|
@ -107,11 +107,7 @@ public abstract class SpanDataBuilder implements SpanData {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A {@code Builder} class for {@link SpanDataBuilder}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Builder} class for {@link SpanDataBuilder}. */
|
||||
@AutoValue.Builder
|
||||
abstract static class Builder {
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@ import javax.annotation.concurrent.Immutable;
|
|||
|
||||
/**
|
||||
* Immutable representation of all data collected by the {@link io.opentelemetry.trace.Span} class.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@Immutable
|
||||
@AutoValue
|
||||
|
|
@ -32,7 +30,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
* Creates a new Builder for creating an SpanData instance.
|
||||
*
|
||||
* @return a new Builder.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public static Builder builder() {
|
||||
return new AutoValue_TestSpanData.Builder()
|
||||
|
|
@ -50,11 +47,7 @@ public abstract class TestSpanData implements SpanData {
|
|||
.setTotalAttributeCount(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* A {@code Builder} class for {@link TestSpanData}.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
/** A {@code Builder} class for {@link TestSpanData}. */
|
||||
@AutoValue.Builder
|
||||
public abstract static class Builder {
|
||||
|
||||
|
|
@ -68,7 +61,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
* Create a new SpanData instance from the data in this.
|
||||
*
|
||||
* @return a new SpanData instance
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public TestSpanData build() {
|
||||
// make unmodifiable copies of any collections
|
||||
|
|
@ -108,7 +100,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param parentSpanId the SpanId of the parent
|
||||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setParentSpanId(String parentSpanId);
|
||||
|
||||
|
|
@ -117,7 +108,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param resource the Resource that generated this span.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setResource(Resource resource);
|
||||
|
||||
|
|
@ -127,7 +117,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
* @param instrumentationLibraryInfo the instrumentation library of the tracer which created
|
||||
* this span.
|
||||
* @return this
|
||||
* @since 0.2.0
|
||||
*/
|
||||
public abstract Builder setInstrumentationLibraryInfo(
|
||||
InstrumentationLibraryInfo instrumentationLibraryInfo);
|
||||
|
|
@ -137,7 +126,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param name the name.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setName(String name);
|
||||
|
||||
|
|
@ -146,7 +134,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param epochNanos the start epoch timestamp in nanos.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setStartEpochNanos(long epochNanos);
|
||||
|
||||
|
|
@ -155,7 +142,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param epochNanos the end epoch timestamp in nanos.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setEndEpochNanos(long epochNanos);
|
||||
|
||||
|
|
@ -166,7 +152,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
* @param attributes {@link ReadableAttributes} for this span.
|
||||
* @return this
|
||||
* @see ReadableAttributes
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setAttributes(ReadableAttributes attributes);
|
||||
|
||||
|
|
@ -176,7 +161,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
* @param events A List<Event> of events associated with this span.
|
||||
* @return this
|
||||
* @see Event
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setEvents(List<Event> events);
|
||||
|
||||
|
|
@ -185,7 +169,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param status The Status of this span.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setStatus(Status status);
|
||||
|
||||
|
|
@ -194,7 +177,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param kind The Kind of span.
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setKind(Kind kind);
|
||||
|
||||
|
|
@ -203,7 +185,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param links A List<Link>
|
||||
* @return this
|
||||
* @since 0.1.0
|
||||
*/
|
||||
public abstract Builder setLinks(List<SpanData.Link> links);
|
||||
|
||||
|
|
@ -212,7 +193,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param hasRemoteParent A boolean indicating if the span has a remote parent.
|
||||
* @return this
|
||||
* @since 0.3.0
|
||||
*/
|
||||
public abstract Builder setHasRemoteParent(boolean hasRemoteParent);
|
||||
|
||||
|
|
@ -221,7 +201,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param hasEnded A boolean indicating if the span has been ended.
|
||||
* @return this
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public abstract Builder setHasEnded(boolean hasEnded);
|
||||
|
||||
|
|
@ -230,7 +209,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param totalRecordedEvents The total number of events recorded.
|
||||
* @return this
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public abstract Builder setTotalRecordedEvents(int totalRecordedEvents);
|
||||
|
||||
|
|
@ -239,7 +217,6 @@ public abstract class TestSpanData implements SpanData {
|
|||
*
|
||||
* @param totalRecordedLinks The total number of links recorded.
|
||||
* @return this
|
||||
* @since 0.4.0
|
||||
*/
|
||||
public abstract Builder setTotalRecordedLinks(int totalRecordedLinks);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue