allow retrieving spans from fiber.Ctx

This commit is contained in:
goc_natalia committed 2024-05-20 11:04:36 +02:00
1 parent 77ab12c3ac
commit 372f4367ed
2 files changed
+12

No files matched your search

+6
View File
@@ -39,6 +39,12 @@ func main() {
}))
defer tracing.ShutdownTracer()
main.Use(func(c *fiber.Ctx) error {
span := tracing.SpanFromContext(c)
span.AddEvent("pushed into a span an event from middleware")
return c.Next()
})
main.Get("/", Handler)
// handle interrupts (shutdown)