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

[@envelop/plugin-prometheus] histogram config is not possible to pass as an array of custom bucket sizes #2307

Open
1 task done
klippx opened this issue Oct 4, 2024 · 0 comments

Comments

@klippx
Copy link
Contributor

klippx commented Oct 4, 2024

Issue workflow progress

  • 1. The issue provides a minimal reproduction available on Stackblitz

Describe the bug

According to docs and typings it should be possible to use this plugin passing the config as an array of numbers:

* You can pass multiple type of values:
* - number[]: Enable the metric with custom buckets
* - ReturnType<typeof createHistogram>: Enable the metric with custom configuration

However, this doesn't work at all 😥

To Reproduce Steps to reproduce the behavior:

https://stackblitz.com/edit/node-m9bjmu?file=index.js

Expected behavior

That it works according to documentation, I should be able to pass an array of bucket sizes. I want to keep my bucket sizes consistent across all services in my stack.

Environment:

See stackblitz

@klippx klippx changed the title [@envelop/response-cache] ttl yielded as NaN [@envelop/plugin-prometheus] histogram config not possible to pass as array of bucket sizes Oct 4, 2024
@klippx klippx changed the title [@envelop/plugin-prometheus] histogram config not possible to pass as array of bucket sizes [@envelop/plugin-prometheus] histogram config not possible to pass as array custom bucket sizes Oct 4, 2024
@klippx klippx changed the title [@envelop/plugin-prometheus] histogram config not possible to pass as array custom bucket sizes [@envelop/plugin-prometheus] histogram config is not possible to pass as an array of custom bucket sizes Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant