File tree Expand file tree Collapse file tree
en/docs/hertz/tutorials/third-party/middleware
zh/docs/hertz/tutorials/third-party/middleware Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func main() {
6565
6666 h.GET (" /hello" , func (ctx context.Context , c *app.RequestContext ) {
6767 // use GetHubFromContext to get the hub
68- if hub := hertzsentry.GetHubFromContext (ctx ); hub != nil {
68+ if hub := hertzsentry.GetHubFromContext (c ); hub != nil {
6969 hub.WithScope (func (scope *sentry.Scope ) {
7070 scope.SetTag (" hertz" , " CloudWeGo Hertz" )
7171 scope.SetLevel (sentry.LevelDebug )
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ func main() {
6565
6666 h.GET (" /hello" , func (ctx context.Context , c *app.RequestContext ) {
6767 // use GetHubFromContext to get the hub
68- if hub := hertzsentry.GetHubFromContext (ctx ); hub != nil {
68+ if hub := hertzsentry.GetHubFromContext (c ); hub != nil {
6969 hub.WithScope (func (scope *sentry.Scope ) {
7070 scope.SetTag (" hertz" , " CloudWeGo Hertz" )
7171 scope.SetLevel (sentry.LevelDebug )
You can’t perform that action at this time.
0 commit comments