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

Documentation issue - advise that assembly names that start with "Sentry" won't have their logger entries logged #99

Closed
cpwood opened this issue Sep 9, 2018 · 4 comments
Labels
Feature New feature or request

Comments

@cpwood
Copy link

cpwood commented Sep 9, 2018

For the Extenions.Logging implementation, it looks as though any assembly whose name starts with the word "Sentry" won't have their logged messages sent to sentry.io .

This cost me a few hours of frustration because I started a new project called "SentryLoggingTest" which logged nothing to sentry.io ! Took a lot of reading of source code to find out why!

I suggest the README.md file is updated to reflect this.

@cpwood cpwood changed the title Documentation issue - advise that assembly names that start with "Sentry" won't their logger entries logged Documentation issue - advise that assembly names that start with "Sentry" won't have their logger entries logged Sep 9, 2018
@bruno-garcia
Copy link
Member

I'm sorry that wasted your time.
I hope it's clear why we filter out Sentry namespace though since this avoids an internal error in the SDK getting into an infinite loop.

Besides documenting this behavior, I'd also suggest we log a debug message.
This way, for those who didn't spot the note in the docs, by enabling Debug mode it will be clear what's going on.

Thanks for raising this.

@bruno-garcia bruno-garcia added the Feature New feature or request label Sep 11, 2018
@cpwood
Copy link
Author

cpwood commented Sep 11, 2018

Just wondering whether there's potentially another way forward.. Thinking out loud here.

Is it true to say that any Sentry namespaces that could cause infinite loops are either within the Extensions.Logging project itself or a referenced assembly? If so, I'm just wondering whether you could say "it begins with Sentry and it's in this assembly or one of this assembly's references".

@bruno-garcia
Copy link
Member

bruno-garcia commented Sep 12, 2018

An error could come from Sentry package and end up in a global handler defined by the application which calls LogError. Or from a package that wraps MEL like Sentry.AspNetCore.

We could have this filter prefix configurable, with Sentry there by default.

At least this is only an issue when creating test apps named 'SentryTest' or something.

Perhaps a simple fix would be to simply changing to:

namespace.StartsWith("Sentry.") || namespace == "Sentry"

This could be a simpler change.

@bruno-garcia
Copy link
Member

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

No branches or pull requests

2 participants