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

metrik

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metrik

Metrics aggregator for logfmt-style metrics

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

metrik

Metrics aggregator for logfmt-style metrics

Assumes a single source

Follows: [https://github.com/ryandotsmith/l2met/wiki/Usage](l2met guidelines)

count#

Sums count# style metrics and includes other key=value pairs.

Enable with -c

Emitted very -i seconds.

measure#

Logs count, sum, min, max, mean, variance, and stdev for a rolling window.

Enable with -m

Set tumbling window size with -w

Usage

Try it out:

> npm install -g metrik
> cat logs.txt
2013-10-25T20:19:41.739142+00:00 app[web.3]: count#vault_usage.http_201=1
2013-10-25T20:19:41.739403+00:00 app[web.3]: count#vault_usage.http_2xx=1
2013-10-25T20:19:41.739616+00:00 app[web.3]: measure#products_usage_events_close=0.070309922ms
2013-10-25T20:19:41.799430+00:00 app[web.14]: count#vault_usage.http_201=1
2013-10-25T20:19:41.799430+00:00 app[web.14]: count#vault_usage.http_2xx=1
2013-10-25T20:19:41.799577+00:00 app[web.14]: measure#products_usage_events_open=0.010993464ms
2013-10-25T20:19:41.826215+00:00 app[web.40]: count#vault_usage.http_201=1

count#

> cat logs.txt | metrik -c

count#vault_usage.http_201=3
count#vault_usage.http_2xx=2
units=ms sample#products_usage_events_close.mean=0.070309922 sample#products_usage_events_close.median=0.070309922 sample#products_usage_events_close.perc95= sample#products_usage_events_close.perc99= now=1383021881431 n=1
units=ms sample#products_usage_events_open.mean=0.010993464 sample#products_usage_events_open.median=0.010993464 sample#products_usage_events_open.perc95= sample#products_usage_events_open.perc99= now=1383021881431 n=1

measure#

Use it on your dyno:

web: bundle exec ruby app.rb | metrik -c worker: bin/worker | metrik -m

FAQs

Package last updated on 29 Jan 2014

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