Metrics
Configuration
Session.configure do |config|
config.metrics_backend = Session::Metrics::LogBackend.new
endBuilt-in Backends
Backend
Behavior
Backend Interface
class StatsDBackend < Session::Metrics::Backend
def increment(name : String, tags : Hash(String, String) = {} of String => String) : Nil
# Send counter to StatsD
end
def timing(name : String, duration : Time::Span, tags : Hash(String, String) = {} of String => String) : Nil
# Send timing to StatsD
end
def gauge(name : String, value : Float64, tags : Hash(String, String) = {} of String => String) : Nil
# Send gauge to StatsD
end
endAvailable Metrics
Constant
Type
Description
Helper Methods
See Also
Last updated
Was this helpful?