Skip to content

Commit

Permalink
Add docs from gofiber/contrib@e6b6de0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 13, 2023
1 parent c68385f commit 63c721a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/contrib/fibernewrelic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,19 @@ func main() {
app.Get("/", func(ctx *fiber.Ctx) error {
return ctx.SendStatus(200)
})

app.Get("/foo", func(ctx *fiber.Ctx) error {
txn := newrelic.FromContext(ctx)
segment := txn.StartSegment("foo segment")
defer segment.End()

// do foo

return nil
})

cfg := fibernewrelic.Config{
Application: newrelicApp
Application: newrelicApp,
}

app.Use(fibernewrelic.New(cfg))
Expand Down

0 comments on commit 63c721a

Please sign in to comment.