Skip to content

Commit 7f771b2

Browse files
authored
fix(hertz): wrong function signature (#1298)
1 parent 1f029cd commit 7f771b2

File tree

2 files changed

+2
-2
lines changed
  • content
    • en/docs/hertz/tutorials/third-party/middleware
    • zh/docs/hertz/tutorials/third-party/middleware

2 files changed

+2
-2
lines changed

content/en/docs/hertz/tutorials/third-party/middleware/sentry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

content/zh/docs/hertz/tutorials/third-party/middleware/sentry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)