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
Mechanism for Auditing Network Access Not Isolated by Hystrix
Netflix#116
- Java agent for instrumenting blocking and non-blocking IO and notifying of these events to a registered listener.
- Hystrix.getCurrentThreadExecutingCommand to allow querying if currently inside a command
* Event listener that gets implemented and registered with {@link HystrixNetworkAuditorAgent#registerEventListener(HystrixNetworkAuditorEventListener)} by the application
20
+
* running Hystrix in the application classloader into this JavaAgent running in the boot classloader so events can be invoked on code inside the application classloader.
* Invoked by the {@link HystrixNetworkAuditorAgent} when network events occur.
26
+
* <p>
27
+
* An event may be the opening of a socket, channel or reading/writing bytes. It is not guaranteed to be a one-to-one relationship with a request/response.
28
+
* <p>
29
+
* No arguments are returned as it is left to the implementation to decide whether the current thread stacktrace should be captured or not.
30
+
* <p>
31
+
* Typical implementations will want to filter to non-Hystrix isolated network traffic with code such as this:
32
+
*
33
+
* <pre> {@code
34
+
*
35
+
* if (Hystrix.getCurrentThreadExecutingCommand() == null) {
36
+
* // this event is not inside a Hystrix context (according to ThreadLocal variables)
* Bytecode ClassFileTransformer used by the Java Agent to instrument network code in the java.* libraries and use Hystrix state to determine if calls are Hystrix-isolated or not.
0 commit comments