Sentry's engineering team details their design process for building a type-safe Metrics API in Swift. The article demonstrates using protocol extensions for default parameter values, enums with associated values for flexible unit types, and ExpressibleByStringLiteral for cleaner syntax. The implementation allows developers to

9m read time From sentry.engineering
Post cover image
Table of contents
Three Important MethodsMetrics Units, Enums And Generic ValuesWhat's Next

Sort: