finish abstract method

void finish({
  1. DateTime? finishTime,
})

Sets the end timestamp and finalizes Span state.

With the exception of calls to Span.context() (which are always allowed), finish() must be the last call made to any Span instance, and to do otherwise leads to undefined behavior. Optional finish time in milliseconds as a Unix timestamp. Decimal values are supported for timestamps with sub-millisecond accuracy. If not specified, the current time (as defined by the implementation) will be used.

Implementation

void finish({DateTime? finishTime});