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