Skip to content

Commit

Permalink
支持多链路
Browse files Browse the repository at this point in the history
  • Loading branch information
mss-boot committed Oct 30, 2020
1 parent 5e3e160 commit 5078403
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/middleware/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func Trace() gin.HandlerFunc {
} else {
sp = opentracing.StartSpan(opName, opentracing.ChildOf(wireContext))
}
defer sp.Finish()
ctx.Set("traceSpan", sp)
ctx.Next()
sp.Finish()
}
}

0 comments on commit 5078403

Please sign in to comment.