You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// - SeeAlso: ``end(clock:)`` which allows passing in a specific time, e.g. if the operation was ended and recorded somewhere and we need to post-factum record it.
115
127
/// Generally though prefer using the ``end()`` version of this API in user code and structure your system such that it can be called in the right place and time.
116
128
publicfunc end(){
117
-
self.end(clock:DefaultTracerClock())
129
+
self.end(at:DefaultTracerClock.now)
118
130
}
119
131
120
132
/// Adds a ``SpanLink`` between this `Span` and the given `Span`.
@@ -152,7 +164,7 @@ public struct SpanEvent: Equatable {
152
164
/// It should be expressed as the number of nanoseconds since UNIX Epoch (January 1st 1970).
153
165
publicletnanosecondsSinceEpoch:UInt64
154
166
155
-
/// Representation of the timestamp this event occured as the number of milliseconds since UNIX Epoch (January 1st 1970).
167
+
/// Representation of the timestamp this event occurred as the number of milliseconds since UNIX Epoch (January 1st 1970).
156
168
publicvarmillisecondsSinceEpoch:UInt64{
157
169
self.nanosecondsSinceEpoch /1_000_000
158
170
}
@@ -161,14 +173,14 @@ public struct SpanEvent: Equatable {
161
173
/// - Parameters:
162
174
/// - name: The human-readable name of this event.
163
175
/// - attributes: attributes describing this event. Defaults to no attributes.
164
-
/// - clock: The clock to use as time source for the start time of the ``Span``
165
-
publicinit<Clock:TracerClock>(name:String,
166
-
clock:Clock,
176
+
/// - instant: the time instant at which the event occurred
0 commit comments