Giter Site home page Giter Site logo

Documentation issue - advise that assembly names that start with "Sentry" won't have their logger entries logged about sentry-dotnet HOT 4 CLOSED

getsentry avatar getsentry commented on May 18, 2024
Documentation issue - advise that assembly names that start with "Sentry" won't have their logger entries logged

from sentry-dotnet.

Comments (4)

bruno-garcia avatar bruno-garcia commented on May 18, 2024 1

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.

from sentry-dotnet.

cpwood avatar cpwood commented on May 18, 2024

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".

from sentry-dotnet.

bruno-garcia avatar bruno-garcia commented on May 18, 2024

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.

from sentry-dotnet.

bruno-garcia avatar bruno-garcia commented on May 18, 2024

@cpwood I was explicit about this behaviour in the docs now:

https://docs.sentry.io/platforms/dotnet/microsoft-extensions-logging/?platform=aspnetcore#installation

from sentry-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.