aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/main/java/com/google/instrumentation/tags/TagKey.java5
-rw-r--r--core/src/main/java/com/google/instrumentation/tags/TagSet.java8
2 files changed, 10 insertions, 3 deletions
diff --git a/core/src/main/java/com/google/instrumentation/tags/TagKey.java b/core/src/main/java/com/google/instrumentation/tags/TagKey.java
index ea6b0518..5787863c 100644
--- a/core/src/main/java/com/google/instrumentation/tags/TagKey.java
+++ b/core/src/main/java/com/google/instrumentation/tags/TagKey.java
@@ -22,9 +22,10 @@ import com.google.instrumentation.internal.StringUtil;
import javax.annotation.concurrent.Immutable;
/**
- * Tag key.
+ * A key to a value stored in a {@link TagSet}.
*
- * @param <TagValueT> The type of value that can be paired with this {@code TagKey}.
+ * @param <TagValueT> The type of value that can be paired with this {@code TagKey}. {@code TagKey}s
+ * can only be instantiated with types {@code String}, {@code Long}, and {@code Boolean}.
*/
@Immutable
@AutoValue
diff --git a/core/src/main/java/com/google/instrumentation/tags/TagSet.java b/core/src/main/java/com/google/instrumentation/tags/TagSet.java
index 17955b0f..7b4f3891 100644
--- a/core/src/main/java/com/google/instrumentation/tags/TagSet.java
+++ b/core/src/main/java/com/google/instrumentation/tags/TagSet.java
@@ -16,7 +16,13 @@ package com.google.instrumentation.tags;
import com.google.instrumentation.internal.StringUtil;
import javax.annotation.Nullable;
-/** A set of tags. */
+/**
+ * A set of key-value pairs that can be used to label anything that is associated with a specific
+ * operation.
+ *
+ * <p>For example, {@code TagSet}s can be used to label stats, log messages, or debugging
+ * information.
+ */
public abstract class TagSet {
/** The maximum length for a string tag value. */
public static final int MAX_STRING_LENGTH = StringUtil.MAX_LENGTH;