pino-sentry icon indicating copy to clipboard operation
pino-sentry copied to clipboard

Consider changing stackAttributeKey default to 'err.stack'

Open segevfiner opened this issue 3 years ago • 9 comments

It is currently set to 'stack': https://github.com/aandrewww/pino-sentry/blob/ba2f56bc1fc21e0d1dc331fa71ae618b23562b9f/src/transport.ts#L68

But I think Pino mostly stores stack traces from errors under 'err.stack'.

segevfiner avatar Jun 19 '22 07:06 segevfiner

@segevfiner since we're at semver's initial development (0.x.y), can make this breaking change.

glensc avatar Jun 30 '22 10:06 glensc

Won't you just increment the minor for this? Initial development/version 0, doesn't have as strong compatibility guarantees as something version 1+

segevfiner avatar Jun 30 '22 10:06 segevfiner

Someday we will increase the major version :)

aandrewww avatar Jun 30 '22 10:06 aandrewww

as i undestand, with 0.x series any minor version bump is considered "major", bumping patch version is still a patch version update (updated with yarn upgrade).

so, if you have ^0.8 in your deps, yarn upgrade will update 0.8.1 to 0.8.2 but not to 0.9.0

glensc avatar Jun 30 '22 10:06 glensc

Yeah. That's the idea. But it's always a good idea to verify in npm docs, since this is often confusing.

segevfiner avatar Jun 30 '22 10:06 segevfiner

@glensc as I understand, it depends on specifying version range (^,~, etc) https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies

aandrewww avatar Jun 30 '22 10:06 aandrewww

@segevfiner I just tested the ^ behavior for 0.x versions yesterday.

glensc avatar Jun 30 '22 12:06 glensc

@aandrewww i'm talking about semver specifier, the ^, if you use something else, like ~ or >= then that's not semver.

glensc avatar Jun 30 '22 12:06 glensc

@segevfiner just submit the pr if you want this in.

glensc avatar Jul 26 '22 19:07 glensc