Closed matianjun1 closed 2 years ago
Sometime I need spanFromContext
such as go-redis-hook
type Hook interface { BeforeProcess(ctx context.Context, cmd Cmder) (context.Context, error) AfterProcess(ctx context.Context, cmd Cmder) error }
only ctx can be propagation, I cant do span.End further
Maybe there is a easy way to solve, set ctxKeyInstance to be public. Then I can use this key to get activeSpan from ctx and do (.Span) to get a Span
Typically, this should be called ctx#activeSpan. We are welcome the contribution.
ctx#activeSpan
Sometime I need spanFromContext
such as go-redis-hook
only ctx can be propagation, I cant do span.End further
Maybe there is a easy way to solve, set ctxKeyInstance to be public. Then I can use this key to get activeSpan from ctx and do (.Span) to get a Span