@Override
    public void before(Object target, Object[] args) {

        if (target instanceof DataSourceMonitorAccessor) {

            final DataSourceMonitorAccessor dataSourceMonitorAccessor = (DataSourceMonitorAccessor) target;

            final DruidDataSourceMonitor dataSourceMonitor = dataSourceMonitorAccessor._$PINPOINT$_getDataSourceMonitor();

            if (dataSourceMonitor != null) {
                dataSourceMonitorAccessor._$PINPOINT$_setDataSourceMonitor(null);
                dataSourceMonitor.close();
                dataSourceMonitorRegistry.unregister(dataSourceMonitor);
            }
        }
    }
Instantiates a new Data source close interceptor.

@param dataSourceMonitorRegistry the data source monitor registry
agent-module/plugins/druid/src/main/java/com/navercorp/pinpoint/plugin/druid/interceptor/DataSourceCloseInterceptor.java