diff --git a/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java b/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java index ac57922d..c4b12570 100644 --- a/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java +++ b/api/src/main/java/com/google/common/flogger/context/ScopedLoggingContext.java @@ -67,6 +67,10 @@ * This is not guaranteed however and the semantic behaviour of context propagation is not defined * by this class. * + *
In particular, if you haven't explicitly opened a context in which to run your code, there is + * no guarantee that a default "global" context exists. In this case any attempts to add metadata + * (e.g. via {@link #addTags}) will fail, returning {@code false}. + * *
Context support and automatic propagation is heavily reliant on Java platform capabilities, * and precise behaviour is likely to differ between runtime environments or frameworks. Context * propagation may not behave the same everywhere, and in some situations logging contexts may not