UNPKG

1.01 kBTypeScriptView Raw
1import type { Client, ClientOptions, MeasurementUnit, MetricsAggregator, Primitive } from '@sentry/types';
2import type { MetricType } from './types';
3/**
4 * A simple metrics aggregator that aggregates metrics in memory and flushes them periodically.
5 * Default flush interval is 5 seconds.
6 *
7 * @experimental This API is experimental and might change in the future.
8 */
9export declare class BrowserMetricsAggregator implements MetricsAggregator {
10 private readonly _client;
11 private _buckets;
12 private readonly _interval;
13 constructor(_client: Client<ClientOptions>);
14 /**
15 * @inheritDoc
16 */
17 add(metricType: MetricType, unsanitizedName: string, value: number | string, unsanitizedUnit?: MeasurementUnit | undefined, unsanitizedTags?: Record<string, Primitive> | undefined, maybeFloatTimestamp?: number | undefined): void;
18 /**
19 * @inheritDoc
20 */
21 flush(): void;
22 /**
23 * @inheritDoc
24 */
25 close(): void;
26}
27//# sourceMappingURL=browser-aggregator.d.ts.map
\No newline at end of file