Telemetria

Ruby agent to track and send data to Telemetria
Installation
Add this line to your application's Gemfile:
gem 'telemetria'
And then execute:
$ bundle
Or install it yourself as:
$ gem install telemetria
Usage
adapter = Telemetria::InfluxDB.new(host: 'localhost', port: '8086', database: 'my_data')
telemetria = Telemetria::Client.new(adapter)
telemetria.create
telemetria.delete
or
Telemetria.configure do |config|
config.adapter = InfluxDB
config.database = 'database'
config.host = '127.0.0.1'
config.port = '8087'
end
telemetria = Telemetria::Client.new
telemetria.create
telemetria.delete
write_data
data = {
series: 'simple_message',
values: {
identifier: 'da807d4622a8e37d6fdd1a62',
url: 'http://google.com.br',
method: 'GET',
seller_id: '131231',
source: '11312',
queue: '31'
},
tags: {
queue: 'teste',
seller_id: 3123
}
}
telemetria.write_data(data)
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/gabrielpedepera/telemetria.