Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion platform-includes/metrics/usage/apple.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ The SDK uses the `SentryAttributeValue` protocol to provide **compile-time type
**Supported attribute types:**
- **Scalar types**: `String`, `Bool`, `Int`, `Double`, `Float`
- **Array types**: `[String]`, `[Bool]`, `[Int]`, `[Double]`, `[Float]`
- **Set types**: `Set<String>`, `Set<Bool>`, `Set<Int>`, `Set<Double>`, `Set<Float>`

The protocol automatically handles type conversion and validation, so you can use Swift's native types directly in your code. Invalid types will be caught at compile time, preventing runtime errors.

Expand All @@ -102,7 +103,8 @@ SentrySDK.metrics.count(
"build_number": 123, // Int - passed directly
"is_premium": true, // Bool - passed directly
"success_rate": 0.95, // Double - passed directly
"tags": ["production", "v2"] // [String] - passed directly
"tags": ["production", "v2"], // [String] - passed directly
"features": Set(["darkMode", "beta"]) // Set<String> - passed directly
]
)
```
Expand Down
Loading