Added a rate limited warning log when using context methods which can fail.
The static methods in ScopedLoggingContexts for adding metadata to an existing context have shown themselves to be very error prone in Google since people often assume that they will always succeed. While there are some valid uses for these methods, most usage fails to take into account the chance of failure.
The robust way to add metadata to a context is to do it when constructing a new context, such as:
Added a rate limited warning log when using context methods which can fail.
The static methods in
ScopedLoggingContexts
for adding metadata to an existing context have shown themselves to be very error prone in Google since people often assume that they will always succeed. While there are some valid uses for these methods, most usage fails to take into account the chance of failure.The robust way to add metadata to a context is to do it when constructing a new context, such as:
RELNOTES=Added warning log when using context methods which can fail.