@Override
        public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {
            InstrumentClass target = instrumentor.getInstrumentClass(classLoader, className, classfileBuffer);
            for (InstrumentMethod method : target.getDeclaredMethods(MethodFilters.name("observe", "toObservable"))) {
                method.addScopedInterceptor(HystrixCommandInterceptor.class, HystrixPluginConstants.HYSTRIX_COMMAND_EXECUTION_SCOPE);
            }
            // 1.5.3+
            InstrumentMethod getFallbackOrThrowException = target.getDeclaredMethod(
                    "getFallbackOrThrowException",
                    "com.netflix.hystrix.AbstractCommand",
                    "com.netflix.hystrix.HystrixEventType",
                    "com.netflix.hystrix.exception.HystrixRuntimeException$FailureType",
                    "java.lang.String",
                    "java.lang.Exception");
            if (getFallbackOrThrowException != null) {
                getFallbackOrThrowException.addScopedInterceptor(
                        HystrixCommandGetFallbackOrThrowExceptionArgs5Interceptor.class,
                        HystrixPluginConstants.HYSTRIX_COMMAND_EXECUTION_SCOPE,
                        ExecutionPolicy.ALWAYS);
            } else {
                // pre 1.5.3
                getFallbackOrThrowException = target.getDeclaredMethod(
                        "getFallbackOrThrowException",
                        "com.netflix.hystrix.HystrixEventType",
                        "com.netflix.hystrix.exception.HystrixRuntimeException$FailureType",
                        "java.lang.String",
                        "java.lang.Exception");
                if (getFallbackOrThrowException != null) {
                    getFallbackOrThrowException.addScopedInterceptor(
                            HystrixCommandGetFallbackOrThrowExceptionArgs4Interceptor.class,
                            HystrixPluginConstants.HYSTRIX_COMMAND_EXECUTION_SCOPE,
                            ExecutionPolicy.ALWAYS);
                }
            }
            return target.toBytecode();
        }
Any Pinpoint profiler plugin must implement ProfilerPlugin interface.
ProfilerPlugin declares only one method {@link #setup(ProfilerPluginSetupContext)}.
You should implement the method to do whatever you need to setup your plugin with the passed ProfilerPluginSetupContext object.

@author Jiaqi Feng
@author HyunGil Jeong
agent-module/plugins/hystrix/src/main/java/com/navercorp/pinpoint/plugin/hystrix/HystrixPlugin.java