traceEnd function
Implementation
void traceEnd(String kind, String method, TraceContext? ctx, String status) {
final tracer = _tracer;
if (ctx == null || tracer == null || !ctx.sampled) return;
try {
tracer.onEnd(kind, method, ctx.traceId, ctx.spanId, status,
ctx._clock.elapsedMicroseconds / 1000.0);
} catch (_) {
// observers must never break the call
}
}