https://github.com/qubole/metriks-addons
Utilities for collecting metrics in a Rails Application
https://github.com/qubole/metriks-addons
Last synced: about 1 year ago
JSON representation
Utilities for collecting metrics in a Rails Application
- Host: GitHub
- URL: https://github.com/qubole/metriks-addons
- Owner: qubole
- License: apache-2.0
- Created: 2015-07-31T10:31:56.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-30T03:31:12.000Z (over 9 years ago)
- Last Synced: 2024-10-31T02:47:50.373Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 63.5 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Utilities for collecting metrics in a Rails Application
[](https://travis-ci.org/qubole/metriks-addons)
This gem provides utilities for collecting and reporting metrics
in a Rails Application. This gem uses [metriks](https://github.com/eric/metriks).
The first category of utilities is Reporters.
## Reporters
Reporters are available for OpenTSDB, SignalFX and AWS Cloudwatch.
The design is heavily inspired by
[Librato Reporter] (https://github.com/eric/metriks-librato_metrics)
### OpenTSDBReporter
``` ruby
reporter = Metriks::OpenTSDBReporter.new(host, tags, options)
reporter.start
```
1. host: hostname of OpenTSDB
2. tags: A hash of tags that should be associated with every metric.
3. options: A hash to control behavior of the reporter. Valid options are:
### SignalFXReporter
``` ruby
reporter = Metriks::SignalFXReporter.new(token, tags, options = {})
reporter.start
```
1. token: Token provided by SignalFX
2. tags: A hash of tags that should be associated with every metric.
### CloudWatchReporter
``` ruby
reporter = Metriks::CloudWatchReporter.new((access_key, secret_key, namespace, tags, options = {}))
reporter.start
```
1. access_key: Access Key provided by AWS
2. secret_key: Secret Key provided by AWS
3. namespace: AWS CloudWatch namespace of the metric
4. tags: A hash of tags that should be associated with every metric.
### Options
All reporters accept a hash of options. Options are used to control the behavior
of the reporter.
| Option | Description (Default)|
---------|----------------------|
| prefix | Add a prefix to the metric name ()|
| batch_size | Number of metrics to report in a API call (50)|
| logger | Logger for debug and info messages (nil) |
| registry | Metriks::Registry to use. (Metriks::Registry.default) |
| interval | Interval between two runs (60 secs) |