diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java index 209f9ee1f09..f59b87599c1 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/ReadableSpan.java @@ -119,7 +119,9 @@ default InstrumentationScopeInfo getInstrumentationScopeInfo() { *

Attributes can be changed during the lifetime of the Span by using {@link * Span#setAttribute}} so this value cannot be cached. * - *

Note: the implementation of this method performs locking to ensure thread-safe behavior. + *

Note: the implementation of this method performs locking and returns an immutable copy to + * ensure thread-safe behavior. If you only need a single attribute it is better to call {@link + * #getAttribute(AttributeKey)}. * * @return the Span attributes, or {@link Attributes#empty()} if the span has no attributes. */