Update to InstrumentationContext javadoc (#4080)

This commit is contained in:
Trask Stalnaker 2021-09-10 11:29:08 -07:00 committed by GitHub
parent d5500d05fd
commit 630a8a41b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -18,12 +18,8 @@ public class InstrumentationContext {
* <p>In reality, the <em>calls</em> to this method are re-written to something more performant
* while injecting advice into a method.
*
* <p>When this method is called from outside of an Advice class it can only access {@link
* ContextStore} when it is already created. For this {@link ContextStore} either needs to be
* registered in {@code
* io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule#registerMuzzleContextStoreClasses(InstrumentationContextBuilder)}
* or be used in an Advice or Helper class which automatically adds it to {@code
* InstrumentationModule#registerMuzzleContextStoreClasses(InstrumentationContextBuilder)}.
* <p>When using this method outside of Advice method, the {@link ContextStore} should be looked
* up once and stored in a field to avoid repeatedly calling this method.
*
* @param keyClass The key class context is attached to.
* @param contextClass The context class attached to the user class.