package.dist.src.config.middleware.experimental-metrics-csv-middleware.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Client SDK for Momento services
The newest version!
import { MomentoLoggerFactory } from '../../';
import { ExperimentalMetricsMiddleware } from './impl/experimental-metrics-middleware';
/**
* This middleware enables per-request client-side metrics. Metrics for each
* request will be written to a CSV file; this file can be analyzed or shared
* with Momento to diagnose performance issues.
*
* The metrics format is currently considered experimental; in a future release,
* once the format is considered stable, this class will be renamed to remove
* the Experimental prefix.
*
* WARNING: enabling this middleware may have minor performance implications,
* so enable with caution.
*
* WARNING: depending on your request volume, the CSV file size may grow quickly;
* neither sampling nor file compression / rotation are included at this time
* (though they may be added in the future).
*
* See `advanced.ts` in the examples directory for an example of how to set up
* your {Configuration} to enable this middleware.
*/
export declare class ExperimentalMetricsCsvMiddleware extends ExperimentalMetricsMiddleware {
static numActiveRequests: number;
private readonly csvPath;
constructor(csvPath: string, loggerFactory: MomentoLoggerFactory);
}