Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs, handle stack trace #313

Open
jsirianni opened this issue Aug 23, 2021 · 1 comment
Open

Nodejs, handle stack trace #313

jsirianni opened this issue Aug 23, 2021 · 1 comment
Assignees

Comments

@jsirianni
Copy link
Member

Nodejs uses json logging, however, stacktraces show up like this

Error: Member does not exist
    at /app/app.js:31:15
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
    at /app/node_modules/express/lib/router/index.js:281:22
    at param (/app/node_modules/express/lib/router/index.js:354:14)
    at param (/app/node_modules/express/lib/router/index.js:365:14)
    at Function.process_params (/app/node_modules/express/lib/router/index.js:410:3)
    at next (/app/node_modules/express/lib/router/index.js:275:10)

Each line is treated as an individual entry

@ericwholt
Copy link
Contributor

I haven't found a good way to handle this through a plugin at this time. The issue is when you have a multiline log entry and single line log entry in the same log file. Unless they have distinct line start patterns there is not way to tell between the two types of logs.

A JSON log entry isn't suited for a good line start pattern as you can have nested json elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants