- Metric Sources
- Using Instrumental
- Where to Start
Metrician ships with a default configuration and an example configuration file. The defaults can be overridden by copying the example file into your project as
config/metrician.yaml, or by setting a different location for that file in the environment variable
The general way to configure Metrician is to flip
enabled flags in that yaml file. For example, you can disable job reporting entirely by changing the value
false in the
jobs section of your configuration. i.e.
# ... # "jobs" settings control reporting metrics when ruby job systems # work through their queues :jobs: # hook into job system middleware when presence detected :enabled: false # ...
||set a metric prefix to be prepended to all metrics - default:
Using those in a Rails application initializer might look something like:
# in config/initializers/instrumental.rb require "instrumental_agent" I = Instrumental::Agent.new("PROJECT_TOKEN") # change "web.request" to "omega.web.request" Metrician.prefix = "omega"
Metrician's configuration file is broken up into several documented sections:
By default, metrician will report request timing, errors (5xx), and Apdex metrics. Read about configuration and the full set of metrics here.
By way of Active Record, Metrician will record metrics about the health of your database queries.
By default, Metrician will report a single query timing stat for all queries. Read about configuration and the full set of metrics here.
If your application depends on external services accessed via HTTP by way of
Net::HTTP, then Metrician will monitor the timing of those requests to make sure they are not slowing down over time and let you see traffic spikes and patterns during the life of your application.
By default, Metrician will report a single timing metric for external service calls. Read about configuration and the full set of metrics here.
If you use delayed_job, resque, or sidekiq in your ruby project, Metrician can automatically report metrics about how long your jobs take to execute and how often they are executing, as well as when they produce errors during execution.
By default Metrician will report job timing and job error metrics. Read about configuration and the full set of metrics here.
By default Metrician will report a single metric for all calls to redis or memcached. Read about the configuration and full set of metrics here.
Metrician can hook into Honeybadger and report when any exceptions are being reported to that service.
By default, Metrician will not report any exception metrics of this sort, but you can read about configuration and the full set of metrics here.
Metrician includes a facility to report the timing and number of executions of any instance or class method.
You can read about configuring method timing here.
By default, Metrician reports the following metrics: