Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 [Feature]: Custom metric attributes for otelfiber #1156

Closed
3 tasks done
hwo411 opened this issue Jul 12, 2024 · 0 comments · Fixed by #1159
Closed
3 tasks done

🚀 [Feature]: Custom metric attributes for otelfiber #1156

hwo411 opened this issue Jul 12, 2024 · 0 comments · Fixed by #1159
Labels
✏️ Feature New feature or request

Comments

@hwo411
Copy link

hwo411 commented Jul 12, 2024

Feature Description

We want to be able to add additional attributes to the metrics exported by otelfiber similar to WithCustomAttrributes for span.

Additional Context (optional)

In our case we want to set a custom parameter based on request body parameter, and it's currently impossible. We either have to reimplement the metrics ourselves via custom middleware or fork the library and use the updated fork.

Code Snippet (optional)

otelfiber.Middleware(otelfiber.WithCustomRequestMetricAttributes(...), otelfiber.WithCustomResponseMetricAttributes(...))
// or
otelfiber.Middleware(otelfiber.WithCustomMetricAttributes(...))

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.
@hwo411 hwo411 added the ✏️ Feature New feature or request label Jul 12, 2024
@hwo411 hwo411 changed the title 🚀 [Feature]: Custom metric/span attributes for otelfiber 🚀 [Feature]: Custom metric attributes for otelfiber Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant