/** * Hooks a new listener to the given operationContext that will update the * metrics for the WASB file system appropriately in response to * ResponseReceived events. * * @param operationContext The operationContext to hook. * @param instrumentation The metrics source to update. * @param blockUploadGaugeUpdater The blockUploadGaugeUpdater to use. */ public static void hook( OperationContext operationContext, AzureFileSystemInstrumentation instrumentation, BandwidthGaugeUpdater blockUploadGaugeUpdater) { ResponseReceivedMetricUpdater listener = new ResponseReceivedMetricUpdater(operationContext, instrumentation, blockUploadGaugeUpdater); operationContext.getResponseReceivedEventHandler().addListener(listener); }
long length = getRequestContentLength(connection); if (length > 0) { blockUploadGaugeUpdater.blockUploaded( long length = getResponseContentLength(connection); if (length > 0) { blockUploadGaugeUpdater.blockDownloaded(
ResponseReceivedMetricUpdater.hook( operationContext, instrumentation,
long length = getRequestContentLength(connection); if (length > 0) { blockUploadGaugeUpdater.blockUploaded( long length = getResponseContentLength(connection); if (length > 0) { blockUploadGaugeUpdater.blockDownloaded(
ResponseReceivedMetricUpdater.hook( operationContext, instrumentation,
/** * Hooks a new listener to the given operationContext that will update the * metrics for the WASB file system appropriately in response to * ResponseReceived events. * * @param operationContext The operationContext to hook. * @param instrumentation The metrics source to update. * @param blockUploadGaugeUpdater The blockUploadGaugeUpdater to use. */ public static void hook( OperationContext operationContext, AzureFileSystemInstrumentation instrumentation, BandwidthGaugeUpdater blockUploadGaugeUpdater) { ResponseReceivedMetricUpdater listener = new ResponseReceivedMetricUpdater(operationContext, instrumentation, blockUploadGaugeUpdater); operationContext.getResponseReceivedEventHandler().addListener(listener); }