-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add breadcrumbMessageFromAction option to handle a message of breadcrumb #98
Conversation
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 26 28 +2
Branches 10 11 +1
=====================================
+ Hits 26 28 +2
Continue to review full report at Codecov.
|
Great idea! A few wording note, but otherwise looks good. If you can make those few changes, I can cut a release later today. |
README.md
Outdated
|
||
Default: `action => action.type` | ||
|
||
`breadcrumbMessageFromAction` allows you to specify a transform function which is passed the `action` object and returns a `string` that describes a message of breadcrumb. Which will be logged to Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about: “That will be used as the message
of the breadcrumb.”
README.md
Outdated
|
||
`breadcrumbMessageFromAction` allows you to specify a transform function which is passed the `action` object and returns a `string` that describes a message of breadcrumb. Which will be logged to Sentry. | ||
|
||
By default, `breadcrumbMessageFromAction` will log `action.type` as a `message` of breadcrumb, but you can specify another value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just “By default breadcrumbMessageFromAction
returns action.type
.
@captbaritone thank you for the review! |
Thanks! I’ll reply here when I cut the release. |
Just cut 1.4.0 fbe0f54 which includes this feature. Thanks again for the pull request. |
Hello @captbaritone !
Sometimes it's necessary to use the different message of action breadcrumb instead of
action.type
.In my project I implemented it, using
Raven.dataCallback
option. But I have to filter if the breadcrumb is action. It would be great if raven-for-redux have this feature. So I addedbreadcrumbMessageFromAction
that allows defining a function to change a message of action. It could be very useful if we want to handle in Sentry custom actions.