aboutsummaryrefslogtreecommitdiff
path: root/api/src/main/java/io/opencensus/common
diff options
context:
space:
mode:
authorBogdan Drutu <bdrutu@google.com>2017-10-18 11:48:22 -0700
committerGitHub <noreply@github.com>2017-10-18 11:48:22 -0700
commitdbff329210261a13e5a8c5ab525114cfdbfd8448 (patch)
treededd67b966a75aa128675b2d4b76b1895d107e91 /api/src/main/java/io/opencensus/common
parent7282b7943b1bcedfca9bb1b6c7693faf95ead747 (diff)
downloadopencensus-java-dbff329210261a13e5a8c5ab525114cfdbfd8448.tar.gz
Add an option in EndSpanOptions to register the span name for sampled store. (#703)
* Add an option in SpanBuilder to register the span name for sampled store. * Change to LocalSpanStore name the SpanBuilder. * Move the option to EndSpanOptions. * Fix comments.
Diffstat (limited to 'api/src/main/java/io/opencensus/common')
-rw-r--r--api/src/main/java/io/opencensus/common/ExperimentalApi.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/api/src/main/java/io/opencensus/common/ExperimentalApi.java b/api/src/main/java/io/opencensus/common/ExperimentalApi.java
new file mode 100644
index 00000000..266da4e9
--- /dev/null
+++ b/api/src/main/java/io/opencensus/common/ExperimentalApi.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2017, OpenCensus Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.opencensus.common;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates a public API that can change at any time, and has no guarantee of API stability and
+ * backward-compatibility.
+ *
+ * <p>Usage guidelines:
+ * <ol>
+ * <li>This annotation is used only on public API. Internal interfaces should not use it.</li>
+ * <li>After OpenCensus has gained API stability, this annotation can only be added to new API.
+ * Adding it to an existing API is considered API-breaking.</li>
+ * <li>Removing this annotation from an API gives it stable status.</li>
+ * </ol>
+ */
+@Internal
+@Retention(RetentionPolicy.SOURCE)
+@Target({
+ ElementType.ANNOTATION_TYPE,
+ ElementType.CONSTRUCTOR,
+ ElementType.FIELD,
+ ElementType.METHOD,
+ ElementType.PACKAGE,
+ ElementType.TYPE})
+@Documented
+public @interface ExperimentalApi {
+ /**
+ * Context information such as links to discussion thread, tracking issue etc.
+ */
+ String value() default "";
+} \ No newline at end of file