@@ -11,36 +11,40 @@ import { metrics as metricsCore } from './exports';
1111/**
1212 * Adds a value to a counter metric
1313 *
14- * @experimental This API is experimental and might have breaking changes in the future.
14+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
1515 */
1616function increment ( name : string , value : number = 1 , data ?: MetricData ) : void {
17+ // eslint-disable-next-line deprecation/deprecation
1718 metricsCore . increment ( MetricsAggregator , name , value , data ) ;
1819}
1920
2021/**
2122 * Adds a value to a distribution metric
2223 *
23- * @experimental This API is experimental and might have breaking changes in the future.
24+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
2425 */
2526function distribution ( name : string , value : number , data ?: MetricData ) : void {
27+ // eslint-disable-next-line deprecation/deprecation
2628 metricsCore . distribution ( MetricsAggregator , name , value , data ) ;
2729}
2830
2931/**
3032 * Adds a value to a set metric. Value must be a string or integer.
3133 *
32- * @experimental This API is experimental and might have breaking changes in the future.
34+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
3335 */
3436function set ( name : string , value : number | string , data ?: MetricData ) : void {
37+ // eslint-disable-next-line deprecation/deprecation
3538 metricsCore . set ( MetricsAggregator , name , value , data ) ;
3639}
3740
3841/**
3942 * Adds a value to a gauge metric
4043 *
41- * @experimental This API is experimental and might have breaking changes in the future.
44+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
4245 */
4346function gauge ( name : string , value : number , data ?: MetricData ) : void {
47+ // eslint-disable-next-line deprecation/deprecation
4448 metricsCore . gauge ( MetricsAggregator , name , value , data ) ;
4549}
4650
@@ -51,7 +55,7 @@ function gauge(name: string, value: number, data?: MetricData): void {
5155 * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
5256 * In the latter case, the duration of the callback execution will be captured as a span & a metric.
5357 *
54- * @experimental This API is experimental and might have breaking changes in the future.
58+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
5559 */
5660function timing ( name : string , value : number , unit ?: DurationUnit , data ?: Omit < MetricData , 'unit' > ) : void ;
5761function timing < T > ( name : string , callback : ( ) => T , unit ?: DurationUnit , data ?: Omit < MetricData , 'unit' > ) : T ;
@@ -61,16 +65,23 @@ function timing<T = void>(
6165 unit : DurationUnit = 'second' ,
6266 data ?: Omit < MetricData , 'unit' > ,
6367) : T | void {
68+ // eslint-disable-next-line deprecation/deprecation
6469 return metricsCore . timing ( MetricsAggregator , name , value , unit , data ) ;
6570}
6671
6772/**
6873 * Returns the metrics aggregator for a given client.
6974 */
7075function getMetricsAggregatorForClient ( client : Client ) : MetricsAggregatorInterface {
76+ // eslint-disable-next-line deprecation/deprecation
7177 return metricsCore . getMetricsAggregatorForClient ( client , MetricsAggregator ) ;
7278}
7379
80+ /**
81+ * The metrics API is used to capture custom metrics in Sentry.
82+ *
83+ * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
84+ */
7485export const metricsDefault : Metrics & {
7586 getMetricsAggregatorForClient : typeof getMetricsAggregatorForClient ;
7687} = {
0 commit comments