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

MaxBreadcrumbs setting & fix README #33

Merged
merged 12 commits into from
Oct 26, 2022

Conversation

SladeThe
Copy link
Contributor

@SladeThe SladeThe commented Oct 20, 2022

log = log.With(zapsentry.NewScope()) is actually a no-op operation, if called before attaching zapsentry core.

The existing zap core ignores it silently. The order does matter.

Another option is to update the zapsentry core itself: core = core.With([]zap.Field{zapsentry.NewScope()})

@SladeThe
Copy link
Contributor Author

At first, I wanted only to update the instruction.

But when I made breadcrumbs work in my real-world application, I noticed that 1000 breadcrumbs is too much as a reasonable default value.

I changed the value down to 100 and added a new MaxBreadcrumbs setting.

@SladeThe SladeThe changed the title Fix breadcrumbs usage instruction MaxBreadcrumbs setting & fix README Oct 21, 2022
@TheZeroSlave
Copy link
Owner

hi, you're completely right. we should attach zapscope to our core not original.

@TheZeroSlave TheZeroSlave merged commit 6cab783 into TheZeroSlave:master Oct 26, 2022
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

Successfully merging this pull request may close these issues.

2 participants