Skip to content

Commit

Permalink
Update documentation for monitor middleware migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneWerner87 committed Oct 9, 2024
1 parent 0b6a26f commit c86c3c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 100 deletions.
94 changes: 0 additions & 94 deletions docs/middleware/monitor.md

This file was deleted.

28 changes: 22 additions & 6 deletions docs/whats_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,7 @@ Now, static middleware can do everything that filesystem middleware and static d

### Monitor

:::caution
DRAFT section
:::

Monitor middleware is now in Contrib package.
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).

### Healthcheck

Expand Down Expand Up @@ -526,7 +522,7 @@ app.Use(static.New("", static.Config{
}))
```

### Healthcheck
#### Healthcheck

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

Expand Down Expand Up @@ -570,3 +566,23 @@ app.Get(healthcheck.DefaultStartupEndpoint, healthcheck.NewHealthChecker(healthc
// Custom liveness endpoint configuration
app.Get("/live", healthcheck.NewHealthChecker())
```

#### Monitor

Since v3 the Monitor middleware has been moved to the [Contrib package](https://github.com/gofiber/contrib/tree/main/monitor)

```go
// Before
import "github.com/gofiber/fiber/v2/middleware/monitor"

app.Use("/metrics", monitor.New())
```

You only need to change the import path to the contrib package.

```go
// After
import "github.com/gofiber/contrib/monitor"

app.Use("/metrics", monitor.New())
```

0 comments on commit c86c3c0

Please sign in to comment.