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

feat: Don't dedupe from inner exception #363

Merged
merged 1 commit into from
Feb 16, 2020

Conversation

bruno-garcia
Copy link
Member

@bruno-garcia bruno-garcia commented Feb 16, 2020

Adds modes to de-duplication of events.
Removes the dedupe for inner exceptions.

The mains driver is EF Core that logs an exception like this:

An exception occurred while iterating over the results of a query for context type '"NuGetTrends.Data.NuGetTrendsContext"'."
""System.InvalidCastException: Column is null
   at Npgsql.NpgsqlDataReader.GetFieldValue[T](Int32 ordinal)
   at lambda_method(Closure , QueryContext , DbDataReader , ResultContext , Int32[] , ResultCoordinator )
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()"

And rethrows. When Sentry wants to log it, it's dropped by the dedupe.

The stack trace from the EF Core entry is useless to the app developer, oesn't lead to the code that started the query.

Deduping InnerExceptions can be opt-in again via:

SentryOptions.DeduplicateMode |= DeduplicateMode.InnerException; 

@codecov-io
Copy link

Codecov Report

Merging #363 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
+ Coverage   93.32%   93.33%   +<.01%     
==========================================
  Files         117      117              
  Lines        2802     2806       +4     
==========================================
+ Hits         2615     2619       +4     
  Misses        187      187
Impacted Files Coverage Δ
.../Internal/DuplicateEventDetectionEventProcessor.cs 96.55% <100%> (+0.39%) ⬆️
src/Sentry/SentryOptions.cs 97.93% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 987834f...f11e26e. Read the comment docs.

@bruno-garcia bruno-garcia merged commit c3dc13e into master Feb 16, 2020
@bruno-garcia bruno-garcia deleted the feat/dont-dedupe-inner-ex branch February 16, 2020 02:29
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.

None yet

2 participants