@@ -78,7 +78,7 @@ function addToMetricsAggregator(
78
78
/**
79
79
* Adds a value to a counter metric
80
80
*
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 .
82
82
*/
83
83
function increment ( aggregator : MetricsAggregatorConstructor , name : string , value : number = 1 , data ?: MetricData ) : void {
84
84
addToMetricsAggregator ( aggregator , COUNTER_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
@@ -87,7 +87,7 @@ function increment(aggregator: MetricsAggregatorConstructor, name: string, value
87
87
/**
88
88
* Adds a value to a distribution metric
89
89
*
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 .
91
91
*/
92
92
function distribution ( aggregator : MetricsAggregatorConstructor , name : string , value : number , data ?: MetricData ) : void {
93
93
addToMetricsAggregator ( aggregator , DISTRIBUTION_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
@@ -100,7 +100,7 @@ function distribution(aggregator: MetricsAggregatorConstructor, name: string, va
100
100
* You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
101
101
* In the latter case, the duration of the callback execution will be captured as a span & a metric.
102
102
*
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 .
104
104
*/
105
105
function timing < T = void > (
106
106
aggregator : MetricsAggregatorConstructor ,
@@ -129,6 +129,7 @@ function timing<T = void>(
129
129
( ) => {
130
130
const endTime = timestampInSeconds ( ) ;
131
131
const timeDiff = endTime - startTime ;
132
+ // eslint-disable-next-line deprecation/deprecation
132
133
distribution ( aggregator , name , timeDiff , { ...data , unit : 'second' } ) ;
133
134
span . end ( endTime ) ;
134
135
} ,
@@ -138,13 +139,14 @@ function timing<T = void>(
138
139
}
139
140
140
141
// value form
142
+ // eslint-disable-next-line deprecation/deprecation
141
143
distribution ( aggregator , name , value , { ...data , unit } ) ;
142
144
}
143
145
144
146
/**
145
147
* Adds a value to a set metric. Value must be a string or integer.
146
148
*
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 .
148
150
*/
149
151
function set ( aggregator : MetricsAggregatorConstructor , name : string , value : number | string , data ?: MetricData ) : void {
150
152
addToMetricsAggregator ( aggregator , SET_METRIC_TYPE , name , value , data ) ;
@@ -153,12 +155,17 @@ function set(aggregator: MetricsAggregatorConstructor, name: string, value: numb
153
155
/**
154
156
* Adds a value to a gauge metric
155
157
*
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 .
157
159
*/
158
160
function gauge ( aggregator : MetricsAggregatorConstructor , name : string , value : number , data ?: MetricData ) : void {
159
161
addToMetricsAggregator ( aggregator , GAUGE_METRIC_TYPE , name , ensureNumber ( value ) , data ) ;
160
162
}
161
163
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
+ */
162
169
export const metrics = {
163
170
increment,
164
171
distribution,
0 commit comments