lib/bm/instrumentations/rack/metrics_collection.rb
def record_request(status_code:, method:, path:, stopwatch:)
          labels = {
            status: status_value(status_code),
            status_code: status_code,
            method: method,
            path: path || NONE
          }

          requests_total.increment(labels: labels)
          request_duration_seconds.observe(stopwatch.to_f, labels: labels)
        end
# Record metrics for a handled request
#
# @param status_code [Integer] is a HTTP status code from response
# @param method [String] is a HTTP method from request
# @param path [String, nil] is a HTTP path name of handled request, may be nil
# @param stopwatch [Instrumentations::Stopwatch] is a started timer
Record metrics for a handled request
Record metrics for a handled request
def record_request(status_code:, method:, path:, stopwatch:)
          labels = {
            status: status_value(status_code),
            status_code: status_code,
            method: method,
            path: path || NONE
          }
          requests_total.increment(labels: labels)
          request_duration_seconds.observe(stopwatch.to_f, labels: labels)
        end
def record_request ( status_code : , method : , path : , stopwatch : ) labels = { status : status_value ( status_code ) , status_code : status_code , method : method , path : path || NONE } requests_total . increment ( labels : labels ) request_duration_seconds . observe ( stopwatch . to_f , labels : labels ) end
Record metrics for a handled request
Record metrics for a handled request
status_code
None
method
None
path
None
stopwatch
None