Skip to content

Commit 8d954b8

Browse files
Add docs from gofiber/fiber@c86c3c0
1 parent 2e2915c commit 8d954b8

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

docs/core/whats_new.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,7 @@ Now, static middleware can do everything that filesystem middleware and static d
325325

326326
### Monitor
327327

328-
:::caution
329-
DRAFT section
330-
:::
331-
332-
Monitor middleware is now in Contrib package.
328+
Monitor middleware is migrated to the [Contrib package](https://github.com/gofiber/contrib/tree/main/monitor) with [PR #1172](https://github.com/gofiber/contrib/pull/1172).
333329

334330
### Healthcheck
335331

@@ -526,7 +522,7 @@ app.Use(static.New("", static.Config{
526522
}))
527523
```
528524

529-
### Healthcheck
525+
#### Healthcheck
530526

531527
Previously, the Healthcheck middleware was configured with a combined setup for liveliness and readiness probes:
532528

@@ -570,3 +566,23 @@ app.Get(healthcheck.DefaultStartupEndpoint, healthcheck.NewHealthChecker(healthc
570566
// Custom liveness endpoint configuration
571567
app.Get("/live", healthcheck.NewHealthChecker())
572568
```
569+
570+
#### Monitor
571+
572+
Since v3 the Monitor middleware has been moved to the [Contrib package](https://github.com/gofiber/contrib/tree/main/monitor)
573+
574+
```go
575+
// Before
576+
import "github.com/gofiber/fiber/v2/middleware/monitor"
577+
578+
app.Use("/metrics", monitor.New())
579+
```
580+
581+
You only need to change the import path to the contrib package.
582+
583+
```go
584+
// After
585+
import "github.com/gofiber/contrib/monitor"
586+
587+
app.Use("/metrics", monitor.New())
588+
```

0 commit comments

Comments
 (0)