You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
View output and see that bucket sizes are the default bucket sizes rather than the ones I've provided in the setup.
Expected behavior
Bucket sizes should be those which I provided to the factory
Actual behavior
Bucket sizes are instead the defaulted bucket sizes hard coded into the library
Environment
OS version: 12.4
Swift version: 5.6
Serverside Swift Framework: Vapor
Framework version: 4
Solution
The root cause appears to be that the makeHistogram function calls createHistogram which has a variable called buckets: Buckets = .defaultBuckets. This defaults to defaultBuckets which is incorrect, it should instead be set to configuration.defaultRecorderBuckets (which itself defaults to defaultBuckets but can be overridden by the user, me, as above).
The text was updated successfully, but these errors were encountered:
Sherlouk
added a commit
to Sherlouk/SwiftPrometheus
that referenced
this issue
Jul 31, 2022
Steps to reproduce
Setup Prometheus and Swift Metrics:
Create a Recorder and record a value:
View output and see that bucket sizes are the default bucket sizes rather than the ones I've provided in the setup.
Expected behavior
Bucket sizes should be those which I provided to the factory
Actual behavior
Bucket sizes are instead the defaulted bucket sizes hard coded into the library
Environment
Solution
The root cause appears to be that the
makeHistogram
function callscreateHistogram
which has a variable calledbuckets: Buckets = .defaultBuckets
. This defaults to defaultBuckets which is incorrect, it should instead be set toconfiguration.defaultRecorderBuckets
(which itself defaults todefaultBuckets
but can be overridden by the user, me, as above).The text was updated successfully, but these errors were encountered: