wip: remove debug

This commit is contained in:
Kevin Franklin Kim 2025-05-12 23:28:57 +02:00
parent 3d9da4ba7a
commit a7193f6c54
No known key found for this signature in database

8
go.go
View File

@ -162,7 +162,9 @@ func Go(fn Func, opts ...Option) <-chan error {
var span trace.Span
if o.tracer != nil {
ctx, span = o.tracer.Start(o.ctx, o.name)
l = l.With("trace_id", span.SpanContext().TraceID().String())
if span.IsRecording() {
l = l.With("trace_id", span.SpanContext().TraceID().String())
}
defer span.End()
}
l.Log(ctx, o.level, "starting gofuncy routine")
@ -187,12 +189,8 @@ func Go(fn Func, opts ...Option) <-chan error {
}
ctx = injectParentRoutineIntoContext(ctx, RoutineFromContext(ctx))
ctx = injectRoutineIntoContext(ctx, o.name)
l.Info("gofuncy --> calling")
err = fn(ctx)
l.Info("gofuncy --> done")
defer l.Info("gofuncy --> out")
errChan <- err
l.Info("gofuncy <-- done")
}(o, errChan)
o.l.Info("gofuncy --> returning")