Skip to content

Tags are not being sent through SentrySdk.CaptureException? .NET 7 API #2497

Closed Answered by jamescrosswell
platform-co asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @platform-co ,

If you configure Sentry with the Debug option I think you'll see a Debug log message explaining what's going.

builder.WebHost.UseSentry(options => { 
  // ... other options
  options.DefaultTags.Add("DefaultTag", "Initial"); 
  options.Debug = true; 
});

I think you'll see something like the following in your Debug Output when you do this:

Event dropped by processor DuplicateEventDetectionEventProcessor

Essentially the exception is being sent through to sentry twice. Once when you call _logger.LogError and once when you call SentrySdk.CaptureException... so sentry drops the second one.

One solution is that you don't pass the exception as a first parameter to _logger.Lo…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@platform-co
Comment options

Answer selected by platform-co
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants