Code Monkey home page Code Monkey logo

libhoney-rb's Introduction

libhoney Build Status Gem Version

Ruby gem for sending events to Honeycomb. (For more information, see the documentation and Ruby SDK guide.)

Installation

To install the stable release:

gem install libhoney

or add libhoney to your Gemfile:

gem 'libhoney'
# or, to follow the bleeding edge:
#gem 'libhoney', git: 'https://github.com/honeycombio/libhoney-rb.git'

This gem has some native dependencies, so if you see an error along the lines of "Failed to build gem native extension", you may need to install the Ruby development headers and a C++ compiler; e.g. on Ubuntu

sudo apt-get install build-essential ruby-dev

Documentation

An API reference is available at http://www.rubydoc.info/gems/libhoney

Example Usage

Honeycomb can calculate all sorts of statistics, so send the values you care about and let us crunch the averages, percentiles, lower/upper bounds, cardinality -- whatever you want -- for you.

require 'libhoney'

# Create a client instance
honeycomb = Libhoney::Client.new(:writekey => "YOUR_WRITE_KEY",
                                 :dataset => "honeycomb-ruby-example")

honeycomb.send_now({
  duration_ms: 153.12,
  method: "get",
  hostname: "appserver15",
  payload_length: 27
})

# Call close to flush any pending calls to Honeycomb
honeycomb.close

You can find a more complete example demonstrating usage in example/fact.rb

Contributions

Features, bug fixes and other changes to libhoney are gladly accepted. Please open issues or a pull request with your change. Remember to add your name to the CONTRIBUTORS file!

All contributions will be released under the Apache License 2.0.

Releasing a new version

Travis will automatically upload tagged releases to Rubygems. To release a new version, run

bump patch --tag   # Or bump minor --tag, etc.
git push --follow-tags

libhoney-rb's People

Contributors

christineyen avatar eanakashima avatar emfree avatar igorwwwwwwwwwwwwwwwwwwww avatar josler avatar paul avatar ryanking avatar samstokes avatar toshok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.