apple / swift-distributed-tracing

Instrumentation library for Swift server applications
https://swiftpackageindex.com/apple/swift-distributed-tracing/main/documentation/tracing
Apache License 2.0
222 stars 30 forks source link

end() should take an autoclosure instant, not direct instant #122

Closed ktoso closed 1 year ago

ktoso commented 1 year ago

Motivation:

we want to avoid querying time if we don't have to

Modifications:

end() functions now take autoclosure () -> Instant allowing us to not query time unless we have to (e.g. are "recording")

Review followup from https://github.com/apple/swift-distributed-tracing/pull/120/files#r1165288201