Skip to content

feat(stacktrace): Show entire stacktrace#67

Merged
ikhemissi merged 1 commit intomasterfrom
feat-view-all-stacktrace
Feb 7, 2022
Merged

feat(stacktrace): Show entire stacktrace#67
ikhemissi merged 1 commit intomasterfrom
feat-view-all-stacktrace

Conversation

@MrSwitch
Copy link
Copy Markdown
Contributor

@MrSwitch MrSwitch commented Feb 7, 2022

This PR

  • Change to show the entire stacktrace.

I find the current stack-trace, whilst simple, does not have enough information for debugging an issue.

i.e. I do not know where this Error was called

{
	"content": {
		"service": "app",
		"message": "themepark: could not load https://frontend-cdn.5app.com/public/themepark/production/style.json",
		"attributes": {
			"stacktrace": [
				"at Request.<anonymous> (/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42)",
				"at runMicrotasks (<anonymous>)"
			],
			"tag": "d5370b1",
			"error": "Response code 404 (Not Found)",
			"timestamp": "2022-02-07T11:20:26.416Z",
			"level": "error"
		}
	}
}

For consideration:...
We could filter out the lines with node_modules as debugging a third party is not as preferable to knowing where in our code we called that third party IMO.

I find the current stack-trace, whilst simple, does not have enough information for debugging an issue. Change this to show the entire stacktrace.
@MrSwitch MrSwitch requested a review from ikhemissi February 7, 2022 11:31
Copy link
Copy Markdown
Contributor

@ikhemissi ikhemissi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

More stack trace lines would definitely be more helpful 👍
I think we should not remove third party library (e.g. node_modules/*) entries in the stacktrace as they can add more explanation for why an error happened especially if the error is a bit vague.

@ikhemissi ikhemissi merged commit 11564b2 into master Feb 7, 2022
@ikhemissi ikhemissi deleted the feat-view-all-stacktrace branch February 7, 2022 13:02
5app-Machine added a commit that referenced this pull request Feb 7, 2022
# [2.3.0](v2.2.0...v2.3.0) (2022-02-07)

### Features

* **stacktrace:** Show entire stacktrace ([#67](#67)) ([11564b2](11564b2))
@5app-Machine
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants