Class: Hooks::Plugins::Instruments::StatsBase Abstract
- Inherits:
-
Object
- Object
- Hooks::Plugins::Instruments::StatsBase
- Includes:
- Core::ComponentAccess
- Defined in:
- lib/hooks/plugins/instruments/stats_base.rb
Overview
Subclass and implement service-specific metrics methods
Base class for all stats instrument plugins
This class provides the foundation for implementing custom metrics reporting instruments. Subclasses should implement specific methods for their target metrics service (DataDog, New Relic, StatsD, etc.).
Direct Known Subclasses
Instance Method Summary collapse
-
#gauge(metric_name, value, tags = {}) ⇒ void
Record a gauge metric.
-
#increment(metric_name, tags = {}) ⇒ void
Record an increment metric.
-
#timing(metric_name, duration, tags = {}) ⇒ void
Record a timing/duration metric.
Methods included from Core::ComponentAccess
#failbot, #log, #method_missing, #respond_to_missing?, #stats
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Hooks::Core::ComponentAccess
Instance Method Details
#gauge(metric_name, value, tags = {}) ⇒ void
Subclasses should implement this method for their specific service
This method returns an undefined value.
Record a gauge metric
This is a no-op implementation that subclasses should override to provide actual metrics reporting functionality.
82 83 84 |
# File 'lib/hooks/plugins/instruments/stats_base.rb', line 82 def gauge(metric_name, value, = {}) # No-op implementation for base class end |
#increment(metric_name, tags = {}) ⇒ void
Subclasses should implement this method for their specific service
This method returns an undefined value.
Record an increment metric
This is a no-op implementation that subclasses should override to provide actual metrics reporting functionality.
46 47 48 |
# File 'lib/hooks/plugins/instruments/stats_base.rb', line 46 def increment(metric_name, = {}) # No-op implementation for base class end |
#timing(metric_name, duration, tags = {}) ⇒ void
Subclasses should implement this method for their specific service
This method returns an undefined value.
Record a timing/duration metric
This is a no-op implementation that subclasses should override to provide actual metrics reporting functionality.
64 65 66 |
# File 'lib/hooks/plugins/instruments/stats_base.rb', line 64 def timing(metric_name, duration, = {}) # No-op implementation for base class end |