Simple CLI tool that let you pipe all heroku logs to cloudwatch.
Instructions at https://viktorkirilov.me/post/pipe-heroku-logs-to-cloudwatch/
NodeJS packages that drains heroku logs in real-time and sends them to CloudWatch
License: MIT License
Simple CLI tool that let you pipe all heroku logs to cloudwatch.
Instructions at https://viktorkirilov.me/post/pipe-heroku-logs-to-cloudwatch/
Hello,
I am using your NPM Package but the issue is the log streams are getting created but no logs are getting updated there
0|npm | (node:2412) UnhandledPromiseRejectionWarning: InvalidParameterExcep tion: The batch of log events in a single PutLogEvents request cannot span more than 24 hours.
0|npm | at Request.extractError (/usr/local/lib/node_modules/node-herok u-cloudwatch-drain/node_modules/aws-sdk/lib/protocol/json.js:51:27)
0|npm | at Request.callListeners (/usr/local/lib/node_modules/node-hero ku-cloudwatch-drain/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
0|npm | at Request.emit (/usr/local/lib/node_modules/node-heroku-cloudw atch-drain/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
0|npm | at Request.emit (/usr/local/lib/node_modules/node-heroku-cloudw atch-drain/node_modules/aws-sdk/lib/request.js:683:14)
0|npm | at Request.transition (/usr/local/lib/node_modules/node-heroku- cloudwatch-drain/node_modules/aws-sdk/lib/request.js:22:10)
0|npm | at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/node -heroku-cloudwatch-drain/node_modules/aws-sdk/lib/state_machine.js:14:12)
0|npm | at /usr/local/lib/node_modules/node-heroku-cloudwatch-drain/nod e_modules/aws-sdk/lib/state_machine.js:26:10
0|npm | at Request.<anonymous> (/usr/local/lib/node_modules/node-heroku -cloudwatch-drain/node_modules/aws-sdk/lib/request.js:38:9)
0|npm | at Request.<anonymous> (/usr/local/lib/node_modules/node-heroku -cloudwatch-drain/node_modules/aws-sdk/lib/request.js:685:12)
0|npm | at Request.callListeners (/usr/local/lib/node_modules/node-hero ku-cloudwatch-drain/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
0|npm | (node:2412) UnhandledPromiseRejectionWarning: Unhandled promise rej ection. This error originated either by throwing inside of an async function wit hout a catch block, or by rejecting a promise which was not handled with .catch( ). (rejection id: 1)
0|npm | (node:2412) [DEP0018] DeprecationWarning: Unhandled promise rejecti ons are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thanks for great library. Gave it a spin today on a test app I've posted to Heroku. Worked pretty well, but getting an occasional error from the parseMetrics module:
TypeError: line.match is not a function or its return value is not iterable
at Object.parseMemoryMetrics (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/src/parseMetrics.js:16:11)
at /home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/src/index.js:47:16
at messages.forEach.message (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/src/setupExpress.js:31:32)
at Array.forEach (<anonymous>)
at /home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/src/setupExpress.js:31:13
at Layer.handle [as handle_request] (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/layer.js:95:5)
at next (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/layer.js:95:5)
at /home/ubuntu/.nvm/versions/node/v8.11.4/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/index.js:281:22
This does not crash the app
TypeError: line.match is not a function or its return value is not iterable
at Object.parseMemoryMetrics (/usr/lib/node_modules/node-heroku-cloudwatch-drain/src/parseMetrics.js:16:11)
at /usr/lib/node_modules/node-heroku-cloudwatch-drain/src/index.js:47:16
at messages.forEach.message (/usr/lib/node_modules/node-heroku-cloudwatch-drain/src/setupExpress.js:31:32)
at Array.forEach (<anonymous>)
at /usr/lib/node_modules/node-heroku-cloudwatch-drain/src/setupExpress.js:31:13
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/layer.js:95:5)
at /usr/lib/node_modules/node-heroku-cloudwatch-drain/node_modules/express/lib/router/index.js:281:22
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.