Feature Description
At the moment custom attributes can be added for traces and metrics, however they are all gathered before the request is routed. This means it's not possible to add custom attributes which you might only know about once the request has been routed. Being able to call something like this would solve multiple challenges for us when it comes to tracing and metrics as we would be able to store/retrieve data from the context and add it to traces/metrics.
Additional Context (optional)
No response
Code Snippet (optional)
otelfiber.Middleware(
otelfiber.WithCustomResponseAttributes(func(ctx *fiber.Ctx) []attribute.KeyValue {
return []attribute.KeyValue{}
}),
otelfiber.WithCustomResponseMetricAttributes(func(ctx *fiber.Ctx) []attribute.KeyValue {
return []attribute.KeyValue{}
}),
)
Checklist:
Feature Description
At the moment custom attributes can be added for traces and metrics, however they are all gathered before the request is routed. This means it's not possible to add custom attributes which you might only know about once the request has been routed. Being able to call something like this would solve multiple challenges for us when it comes to tracing and metrics as we would be able to store/retrieve data from the context and add it to traces/metrics.
Additional Context (optional)
No response
Code Snippet (optional)
Checklist: