keen-collector

0.0.1 • Public • Published

Keen Collector function

This is the module that we use to send events to Keen.IO

This module exports a function which takes a configuration object.

Given a valid configuration, it will return a function that you can send arbitrary JavaSript objects to

Those objects will be sent off to Keen.IO

Example usage:

// Load up the module

var KeenCollector = require('keen-collector')

// Create your configuration object

var myConfig = {
    projectToken: "YOUR PROJECT TOKEN HERE"
    , eventCollection: "YOUR EVENT COLLECTION HERE"
}

// Create a collector

var myCollector = KeenCollector(myConfig)

// Send it something

myCollector({ message: "Hello, world!" })

// That object should now beein in your Keen.IO collection!

Configuration

projectToken is required and must be a string

eventCollection is required and must be a string

endpoint is optional and defaults to https://api.keen.io/3.0/projects/

requestLog if true will log information about HTTP requests that are sent to Keen

responseLog if true will log information about HTTP responses from Keen

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1
  • 0.0.0
    1

Package Sidebar

Install

npm i keen-collector

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • robertjd