@@ -78,7 +78,7 @@ function addToMetricsAggregator(
7878/**
7979 * Adds a value to a counter metric
8080 *
81- * @experimental This API is experimental and might have breaking changes in the future.
81+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
8282 */
8383function increment ( aggregator : MetricsAggregatorConstructor , name : string , value : number = 1 , data ?: MetricData ) : void {
8484 addToMetricsAggregator ( aggregator , COUNTER_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
@@ -87,7 +87,7 @@ function increment(aggregator: MetricsAggregatorConstructor, name: string, value
8787/**
8888 * Adds a value to a distribution metric
8989 *
90- * @experimental This API is experimental and might have breaking changes in the future.
90+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
9191 */
9292function distribution ( aggregator : MetricsAggregatorConstructor , name : string , value : number , data ?: MetricData ) : void {
9393 addToMetricsAggregator ( aggregator , DISTRIBUTION_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
@@ -100,7 +100,7 @@ function distribution(aggregator: MetricsAggregatorConstructor, name: string, va
100100 * You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
101101 * In the latter case, the duration of the callback execution will be captured as a span & a metric.
102102 *
103- * @experimental This API is experimental and might have breaking changes in the future.
103+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
104104 */
105105function timing < T = void > (
106106 aggregator : MetricsAggregatorConstructor ,
@@ -129,6 +129,7 @@ function timing<T = void>(
129129 ( ) => {
130130 const endTime = timestampInSeconds ( ) ;
131131 const timeDiff = endTime - startTime ;
132+ // eslint-disable-next-line deprecation/deprecation
132133 distribution ( aggregator , name , timeDiff , { ...data , unit : 'second' } ) ;
133134 span . end ( endTime ) ;
134135 } ,
@@ -138,13 +139,14 @@ function timing<T = void>(
138139 }
139140
140141 // value form
142+ // eslint-disable-next-line deprecation/deprecation
141143 distribution ( aggregator , name , value , { ...data , unit } ) ;
142144}
143145
144146/**
145147 * Adds a value to a set metric. Value must be a string or integer.
146148 *
147- * @experimental This API is experimental and might have breaking changes in the future.
149+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
148150 */
149151function set ( aggregator : MetricsAggregatorConstructor , name : string , value : number | string , data ?: MetricData ) : void {
150152 addToMetricsAggregator ( aggregator , SET_METRIC_TYPE , name , value , data ) ;
@@ -153,12 +155,17 @@ function set(aggregator: MetricsAggregatorConstructor, name: string, value: numb
153155/**
154156 * Adds a value to a gauge metric
155157 *
156- * @experimental This API is experimental and might have breaking changes in the future.
158+ * @deprecated The Sentry metrics beta has ended. This method will be removed in a future release .
157159 */
158160function gauge ( aggregator : MetricsAggregatorConstructor , name : string , value : number , data ?: MetricData ) : void {
159161 addToMetricsAggregator ( aggregator , GAUGE_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
160162}
161163
164+ /**
165+ * The metrics API is used to capture custom metrics in Sentry.
166+ *
167+ * @deprecated The Sentry metrics beta has ended. This export will be removed in a future release.
168+ */
162169export const metrics = {
163170 increment,
164171 distribution,
0 commit comments