Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

protorclient_ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protorclient_ruby

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

protor-ruby

Prometheus aggregator client for ruby

Installation

In Gemfile

gem 'protor'

Then run

bundle install

Usage

Counter

It automatically aggregate value

protor.counter(:counter, 1, {label1: 1}) # value => 1
protor.counter(:counter, 1, {label1: 1}) # value => 2

Gauge

It automatically replace value

protor.gauge(:gauge, 50) # value 50
protor.gauge(:gauge, 20) # value 20

Histogram

It save all observed values

protor.histogram(:histogram, 10, {label1: 1}, [1,2,3,4]) # observed value [10]
protor.histogram(:histogram, 2, {label1: 1}, [1,2,3,4](  # observed value [10,2]

Publish

To publish all saved metrics to aggregator

protor.publish

Configuration

To configure protor:

$protor = Protor.new do |conf|
  conf[:service] = 'service name' # required service name 
  conf[:host] = 'localhost' # optional prometheus_aggregator host
  conf[:port] = 8080 # optional prometheus_aggregator port
  conf[:logger] = Rails.logger # optional logger to be used by protor
  conf[:silent] = True #optional, set it to true if you dont want receive raise error
end

FAQs

Package last updated on 13 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc