← All platforms

Fiber error tracking

Familiar routing, Go underneath. When a Fiber handler breaks, the Sentry integration sends its error report to Telebugs on your server.

~/hoofnotes  go get github.com/getsentry/sentry-go/fiber
~/hoofnotes  nvim error_tracking.go main.go
package main
import "github.com/getsentry/sentry-go"
func initErrorTracking() error {
return sentry.Init(sentry.ClientOptions{
// Copy the complete Telebugs DSN, key and path included.
Dsn: "YOUR_TELEBUGS_DSN",
})
}
package main
import (
"time"
"github.com/getsentry/sentry-go"
sentryfiber "github.com/getsentry/sentry-go/fiber"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/recover"
)
func main() {
if err := initErrorTracking(); err != nil {
panic(err)
}
defer sentry.Flush(2 * time.Second)
app := fiber.New()
app.Use(recover.New())
app.Use(sentryfiber.New(sentryfiber.Options{Repanic: true}))
registerNotesRoutes(app)
app.Listen(":3000")
}
~/hoofnotes  go run .

Space pauses or resumes. R replays. Escape shows the complete setup.

Hang on, I already use Sentry

Keep sentry-go and change its destination to your Telebugs DSN. Your error reports stay on your server. You don’t need a Sentry account.

Does Fiber’s recovery still work?

Yes. Sentry’s middleware can report a panic and pass it on to Fiber’s recovery middleware. The response stays your app’s responsibility; Telebugs keeps the report.

What about errors I return instead of panicking?

Go errors are values. Report one explicitly with CaptureException when it matters. A middleware connection doesn’t automatically turn every returned error into a report.