{"_id":"@aptoma/grimm-pusher","_rev":"5-508ddb8abca7e4e9f2cd08a04674cb92","name":"@aptoma/grimm-pusher","description":"Module for pushing events to Grimm","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@aptoma/grimm-pusher","version":"0.0.1","description":"Module for pushing events to Grimm","license":"MIT","main":"index.js","author":{"name":"Gunnar Lium","email":"gunnar@aptoma.com"},"engines":{"node":"4.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/aptoma/grimm-pusher.git"},"scripts":{"ci":"eslint index.js lib && mocha lib/**.test.js","test":"mocha lib/**.test.js","watch":"mocha --watch 'lib/**/*.js' --timeout 500"},"dependencies":{"@aptoma/timer":"^1.0.1","bluebird":"^3.3.1","joi":"^8.4.2","moment-timezone":"^0.5.4","request-prom":"^1.0.0"},"devDependencies":{"@aptoma/eslint-config":"^4.0.0","chai":"^3.5.0","eslint":"^2.5.3","mocha":"^2.5.3","testdouble":"^1.4.2"},"gitHead":"d5a2f230c71ce2fd47d50401eedff7c4032535e0","bugs":{"url":"https://github.com/aptoma/grimm-pusher/issues"},"homepage":"https://github.com/aptoma/grimm-pusher#readme","_id":"@aptoma/grimm-pusher@0.0.1","_shasum":"f53a927c083a5f64166b793312e4881ed5d5a09b","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"aptoma","email":"npm@aptoma.com"},"dist":{"shasum":"f53a927c083a5f64166b793312e4881ed5d5a09b","tarball":"https://registry.npmjs.org/@aptoma/grimm-pusher/-/grimm-pusher-0.0.1.tgz","integrity":"sha512-q52V8P5+ElUXQUxvWUlInTJ8T7nTncvOtnp/eN/lX9D2cmsNPj1ZtAIfGCy+syQCIp+UJ8PgLswwhN79Ao7jPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWJ/FOCbYfGQ4E+Z01WdI0QgJ3YIug51p6cTR/aCFlfQIgRKFyyyUEqUAnr6p7u+AL1zA375jBv4u4h0ql6sJHZoI="}]},"maintainers":[{"name":"aptoma","email":"npm@aptoma.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/grimm-pusher-0.0.1.tgz_1465906443494_0.9598907947074622"}},"1.0.0":{"name":"@aptoma/grimm-pusher","version":"1.0.0","description":"Module for pushing events to Grimm","license":"MIT","main":"index.js","author":{"name":"Gunnar Lium","email":"gunnar@aptoma.com"},"engines":{"node":"4.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/aptoma/grimm-pusher.git"},"scripts":{"ci":"eslint index.js lib && mocha lib/**.test.js","release":"release-it -n -i patch","release:minor":"release-it -n -i minor","release:major":"release-it -n -i major","test":"mocha lib/**.test.js","watch":"mocha --watch 'lib/**/*.test.js' --timeout 500 -G"},"dependencies":{"@aptoma/timer":"^1.0.1","bluebird":"^3.3.1","lodash.throttle":"^4.0.1","moment-timezone":"^0.5.4","request-prom":"^1.0.0"},"devDependencies":{"@aptoma/eslint-config":"^4.0.0","chai":"^3.5.0","eslint":"^2.5.3","mocha":"^2.5.3","testdouble":"^1.4.2"},"gitHead":"3e67e5a1a85c5d7be5ce9a75bbfc349067d3af7d","bugs":{"url":"https://github.com/aptoma/grimm-pusher/issues"},"homepage":"https://github.com/aptoma/grimm-pusher#readme","_id":"@aptoma/grimm-pusher@1.0.0","_shasum":"e632fd3009dcea52999d6b8e92eb93d94b1a369d","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"aptoma","email":"npm@aptoma.com"},"dist":{"shasum":"e632fd3009dcea52999d6b8e92eb93d94b1a369d","tarball":"https://registry.npmjs.org/@aptoma/grimm-pusher/-/grimm-pusher-1.0.0.tgz","integrity":"sha512-3FFEZ9BeNClX+SUUkDfwoT/QOXeXbBlGk5ikDhDr8obvQIJ3/EYDvbfww53dKI+3fbdnpwcBoRSIruQ/g5QEbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7Y5LFwLojXvAN2oKFdKM+5NkTn/LBu6hhyqr44JVgBAIhAKfz91BXdh+g27nv6qXpJ9gTtx91sJ6xIuL3OhQ56CvL"}]},"maintainers":[{"name":"aptoma","email":"npm@aptoma.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/grimm-pusher-1.0.0.tgz_1467722724033_0.7529041259549558"}},"1.0.1":{"name":"@aptoma/grimm-pusher","version":"1.0.1","description":"Module for pushing events to Grimm","license":"MIT","main":"index.js","author":{"name":"Gunnar Lium","email":"gunnar@aptoma.com"},"engines":{"node":"4.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/aptoma/grimm-pusher.git"},"scripts":{"ci":"eslint index.js lib && mocha lib/**.test.js","release":"release-it -n -i patch","release:minor":"release-it -n -i minor","release:major":"release-it -n -i major","test":"mocha lib/**.test.js","watch":"mocha --watch 'lib/**/*.test.js' --timeout 500 -G"},"dependencies":{"bluebird":"^3.3.1","lodash.throttle":"^4.0.1","moment-timezone":"^0.5.4","request-prom":"^1.0.0"},"devDependencies":{"@aptoma/eslint-config":"^4.0.0","chai":"^3.5.0","eslint":"^2.5.3","mocha":"^2.5.3","testdouble":"^1.4.2"},"gitHead":"a077768ab5dceff593dcdf28d17e2f688931b5b1","bugs":{"url":"https://github.com/aptoma/grimm-pusher/issues"},"homepage":"https://github.com/aptoma/grimm-pusher#readme","_id":"@aptoma/grimm-pusher@1.0.1","_shasum":"7d311fdae177b5a4517282d71345b6823105b109","_from":".","_npmVersion":"2.15.1","_nodeVersion":"4.4.3","_npmUser":{"name":"aptoma","email":"npm@aptoma.com"},"dist":{"shasum":"7d311fdae177b5a4517282d71345b6823105b109","tarball":"https://registry.npmjs.org/@aptoma/grimm-pusher/-/grimm-pusher-1.0.1.tgz","integrity":"sha512-0QOlBQmqupVer5I+K/Egnakrzeh9igg0trysaCuD9lnqZ9aIgTc0FtlH4tEDiJNfPvH1U+JG3pnzXkXz8vukAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2hWog0sWsns2bxZVUUXqvncdI8MBr0YJ8OaHgy4oBeAiEA4GG47OPHxZZ7Ud+fOvgJY/CanNz3rGrwwLd65PjSoJY="}]},"maintainers":[{"name":"aptoma","email":"npm@aptoma.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/grimm-pusher-1.0.1.tgz_1467730221193_0.6105309266131371"}}},"readme":"Grimm Pusher\n============\n\nNode module for pushing events to Grimm.\n\nUsage\n-----\n\nInstall with npm:\n\n    $ npm install --save @aptoma/grimm-pusher\n\nInclude it in your code:\n\n```js\nconst grimmPusher = require('@aptoma/grimm-pusher');\n\nconst options = {\n\thost: 'https://grimm.example.com',\n\tapiKey: 'secret',\n\t// Batch events within this number of milliseconds\n\tthrottleMs: 1000,\n\t// Send regardless of throttling once this many events are queued\n\tmaxBatchSize: 100\n};\n\n// Create instance\nconst grimmService = grimmPusher.createService(options);\n// Or as singleton\nconst grimmServiceSingleton = grimmPusher.singleton();\ngrimmServiceSingleton.configure(options);\n\n// Fired when events are successfully processed\ngrimmService.on('success', console.info);\n// Fired when an error occurs\ngrimmService.on('error', console.error);\n\n// Add events for sending later\ngrimmService.add({\n    name: 'SomeMetric',\n    time: Date.now(), // Optional, will be set automatically if left out\n    fields: {\n        msec: 12\n    },\n    tags: {\n        service: 'my-service'\n    }\n});\n\n// Process any unsent events, should be called just before script terminates, to ensure there are no pending events\ngrimmService.process();\n```\n\n### Batching\n\nFor better performance, it's recommended to batch events. The default is to send each event immediately, but you are strongly encouraged to enable batching.\n\nYou can safely send several hundred events in a batch. If event volume is moderate, sending every second is a good baseline.\n\n### Logging and events\n\n`GrimmPusher` is an `EventEmitter`. The following events may fire:\n\n- `success`: When `process()` succeeds, either due to no pending events, or successful delivery of all events\n- `error`: When `process()` fails, either due to missing config or bad response from the backend\n","maintainers":[{"name":"aptoma","email":"npm@aptoma.com"}],"time":{"modified":"2022-06-12T14:46:02.665Z","created":"2016-06-14T12:14:06.624Z","0.0.1":"2016-06-14T12:14:06.624Z","1.0.0":"2016-07-05T12:45:26.384Z","1.0.1":"2016-07-05T14:50:23.300Z"},"homepage":"https://github.com/aptoma/grimm-pusher#readme","repository":{"type":"git","url":"git+ssh://git@github.com/aptoma/grimm-pusher.git"},"author":{"name":"Gunnar Lium","email":"gunnar@aptoma.com"},"bugs":{"url":"https://github.com/aptoma/grimm-pusher/issues"},"license":"MIT","readmeFilename":"README.md"}