Skip to content

Commit 3637927

Browse files
committed
feat(metrics): Expose Objective-C compatible methods for count, distribution, and gauge metrics
1 parent 87379ed commit 3637927

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Swift/Integrations/Metrics/MetricsApi.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/// Prefer stable, lowercase, dot-delimited names to aid aggregation and filtering.
1111
/// - value: The count value to record. Typically a non-negative integer (e.g., 1 to increment by one).
1212
/// Values less than zero may be ignored or clamped by the metrics backend.
13+
@objc(count:value:)
1314
public func count(key: String, value: Int) {
1415
// noop
1516
}
@@ -25,6 +26,7 @@
2526
/// Prefer stable, lowercase, dot-delimited names to aid aggregation and filtering.
2627
/// - value: The value to record in the distribution. This can be any numeric value
2728
/// representing the measurement (e.g., milliseconds for response time).
29+
@objc(distribution:value:)
2830
public func distribution(key: String, value: Double) {
2931
// noop
3032
}
@@ -40,6 +42,7 @@
4042
/// Prefer stable, lowercase, dot-delimited names to aid aggregation and filtering.
4143
/// - value: The current gauge value to record. This represents the state at the time of
4244
/// recording (e.g., current memory in bytes, current number of items in queue).
45+
@objc(gauge:value:)
4346
public func gauge(key: String, value: Double) {
4447
// noop
4548
}

0 commit comments

Comments
 (0)