@@ -11,36 +11,40 @@ import { metrics as metricsCore } from './exports';
11
11
/**
12
12
* Adds a value to a counter metric
13
13
*
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 .
15
15
*/
16
16
function increment ( name : string , value : number = 1 , data ?: MetricData ) : void {
17
+ // eslint-disable-next-line deprecation/deprecation
17
18
metricsCore . increment ( MetricsAggregator , name , value , data ) ;
18
19
}
19
20
20
21
/**
21
22
* Adds a value to a distribution metric
22
23
*
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 .
24
25
*/
25
26
function distribution ( name : string , value : number , data ?: MetricData ) : void {
27
+ // eslint-disable-next-line deprecation/deprecation
26
28
metricsCore . distribution ( MetricsAggregator , name , value , data ) ;
27
29
}
28
30
29
31
/**
30
32
* Adds a value to a set metric. Value must be a string or integer.
31
33
*
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 .
33
35
*/
34
36
function set ( name : string , value : number | string , data ?: MetricData ) : void {
37
+ // eslint-disable-next-line deprecation/deprecation
35
38
metricsCore . set ( MetricsAggregator , name , value , data ) ;
36
39
}
37
40
38
41
/**
39
42
* Adds a value to a gauge metric
40
43
*
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 .
42
45
*/
43
46
function gauge ( name : string , value : number , data ?: MetricData ) : void {
47
+ // eslint-disable-next-line deprecation/deprecation
44
48
metricsCore . gauge ( MetricsAggregator , name , value , data ) ;
45
49
}
46
50
@@ -51,7 +55,7 @@ function gauge(name: string, value: number, data?: MetricData): void {
51
55
* You can either directly capture a numeric `value`, or wrap a callback function in `timing`.
52
56
* In the latter case, the duration of the callback execution will be captured as a span & a metric.
53
57
*
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 .
55
59
*/
56
60
function timing ( name : string , value : number , unit ?: DurationUnit , data ?: Omit < MetricData , 'unit' > ) : void ;
57
61
function timing < T > ( name : string , callback : ( ) => T , unit ?: DurationUnit , data ?: Omit < MetricData , 'unit' > ) : T ;
@@ -61,16 +65,23 @@ function timing<T = void>(
61
65
unit : DurationUnit = 'second' ,
62
66
data ?: Omit < MetricData , 'unit' > ,
63
67
) : T | void {
68
+ // eslint-disable-next-line deprecation/deprecation
64
69
return metricsCore . timing ( MetricsAggregator , name , value , unit , data ) ;
65
70
}
66
71
67
72
/**
68
73
* Returns the metrics aggregator for a given client.
69
74
*/
70
75
function getMetricsAggregatorForClient ( client : Client ) : MetricsAggregatorInterface {
76
+ // eslint-disable-next-line deprecation/deprecation
71
77
return metricsCore . getMetricsAggregatorForClient ( client , MetricsAggregator ) ;
72
78
}
73
79
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
+ */
74
85
export const metricsDefault : Metrics & {
75
86
getMetricsAggregatorForClient : typeof getMetricsAggregatorForClient ;
76
87
} = {
0 commit comments