You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to store an object to the context store in a module A and access an object from the context store from instrumentation module B.
For instance my apache HC client instrumentation module hooks into HttpEntity.WriteTo() and puts OutputStream into a context as a key. Now I would like to access the context store in OutputStreamInstrumentation and check if the OutputStream is in the context - if it is instrumentation for write methods puts input into buffer (value from the context).
Describe the solution you'd like
Define context store in instrumentation module A and access it in instrumentation module B
Describe alternatives you've considered
Use a global instance of weak map to share objects/state across instrumentations from different modules.
The text was updated successfully, but these errors were encountered:
FWIU (which could be wrong :) ), contextStore is basically just a mechanism to add fields to classes, or if that can't happen due to redefinition problems, falls back to a global weak map. I wouldn't see any reason for a context store with the same definition in two modules to not work, unless we explicitly fail to set a second contextStore if there's a duplicate definition, I guess we would be able to remove such a check if it exists.
Is your feature request related to a problem? Please describe.
I would like to store an object to the context store in a module A and access an object from the context store from instrumentation module B.
For instance my apache HC client instrumentation module hooks into
HttpEntity.WriteTo()
and putsOutputStream
into a context as a key. Now I would like to access the context store inOutputStreamInstrumentation
and check if theOutputStream
is in the context - if it is instrumentation for write methods puts input into buffer (value from the context).Describe the solution you'd like
Define context store in instrumentation module A and access it in instrumentation module B
Describe alternatives you've considered
Use a global instance of weak map to share objects/state across instrumentations from different modules.
The text was updated successfully, but these errors were encountered: