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

[merge] feat(metrics) histograms with user-defined bins #610

Merged
merged 1 commit into from
Oct 23, 2024

Commits on Oct 23, 2024

  1. feat(metrics) implement user-defined histogram bins

    This feature is only available through the FFI.
    
    If a user provides a list of numbers when defining a histogram, those
    numbers will be used as the upper-bounds of the histogram's bins.
    
    For instance, the following code:
    
        local shm = require "resty.wasmx.shm"
        shm.metrics:define("h", shm.metrics.HISTOGRAM, { bins = { 1, 3, 5 } })
    
    Creates a histogram with bins `[0, 1] (1, 3] (3, 5] (5, Inf+]`.
    
    Signed-off-by: Thibault Charbonnier <[email protected]>
    casimiro authored and thibaultcha committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    321e69f View commit details
    Browse the repository at this point in the history