Comments (5)
@dglasl It seems the problem is the DSN
.
You need to replace that string with your actual DSN. You get one when you create a project with Sentry.
One way to do go is to sign up with sentry.io. There you get your DSN (which is a URI
like https://[email protected]/more-stuff
.
Add that to your sample instead of the string DSN
.
After that, when a crash happens, you'll see the event in your Sentry project.
Like this example (which has my DSN):
sentry-dotnet/samples/Sentry.Samples.Log4Net/app.config
Lines 13 to 17 in e96be9f
from sentry-dotnet.
Hello and thank you very much for your answer.
I forgot to mention that in the place of DSN there is of course a real one and I only censored it.
Also, if I register the DSN in the .config file, the error logging works and I see the error in Sentry.
from sentry-dotnet.
@dglasl Sorry I misunderstood the issue.
This was indeed a bug.
The Appender, when not Initializing the SDK by itself, decided not to use the Hub
at all, even if that was already enabled. Then not sending events at all.
I've pushed a fix which simply checks if the current Hub is already enabled. If it is, it'll carry on using that instead of trying to initialize a new one.
If you are currently blocked by this, please note the Release
can also be set via the attributes AssemblyInformationalVersion
or AssemblyVersion
(which can also be set via csproj or also via environment variable SENTRY_RELESE
in the session/process or machine running the code.
One last note, please make sure to hold on to the IDisposable
returned by SentrySdk.Init
and dispose it at the end of the application execution. This makes sure any queued up event gets flushed out to Sentry before the app terminates.
If the SDK is initialized via a Program.cs
Main
method, this can be done like:
using (SentrySdk.Init())
{
// app code ..
}
from sentry-dotnet.
Thank you very much the quick answer and the fix!
I really appreciate it.
from sentry-dotnet.
@dglasl thank you for using it and reporting.
from sentry-dotnet.
Related Issues (20)
- Confusing debug log message HOT 1
- Improve grouping
- Hubs & Scopes Refactoring
- Failed to send envelopes persist on disk
- SentryHttpClientFactory option ignored? HOT 1
- `Debug` and `DiagnosticLogger` options behavior HOT 3
- Crons Hangfire integration - find job names automatically
- Scopes not being applied to Spans when using ASP.NET Core with OTel
- Investigate using custom builds for AOT compiled or trimmed apps
- Check DebugStackTrace conditional execution/suppressions HOT 5
- Updated SDK gives error with symbol upload on Windows
- Queries in Sentry show banner"could not find query source" on latest SDK version
- Implicit OpenTelemetry initialization
- Enable Ben.Demystifier for AOT apps HOT 3
- Unable to build a MAUI iOS app using a self-hosted Azure DevOps build agent HOT 7
- Sentry.MAUI crashing when launching HOT 26
- Just migrated my UWP app to Sentry from AppCenter but the release build is crashing on startup. Debug build runs fine HOT 19
- ASP.NET .NET Framework Website (web.config) project with Sentry fails to builds on Azure build agent HOT 6
- WinUI: Native (test) crashes aren't reported HOT 5
- Prepare Metrics for GA
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry-dotnet.