2

im using errbit 0-3 stable and its working really good .

but the problem is sometimes it start spamming me emails for the same error but different hashes like the following :

Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x007fdba42891f0 @tag_sets=[], @options={:database=>"db_test", :max_pool_size=>200, :wait_queue_timeout=>5, :write=>{"w"=>0}}, @server_selection_timeout=30>


Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x007fdbb8148e30 @tag_sets=[], @options={:database=>"db_test", :max_pool_size=>200, :wait_queue_timeout=>5, :write=>{"w"=>0}}, @server_selection_timeout=30>

How can i filter them so it would group them into 1 error only ?

1 Answers1

1

There's two ways to deal with this.

Option 1) Catch the errors in your application and scrub the uniqueness out of the error messages before sending them to Errbit.

Option 2) Errbit supports configurable "fingerprinting" so you can actually tell Errbit what attributes contribute to the uniqueness of error notifications. This can be done system-wide or on individual Errbit apps. In your case, you could toggle off the error message as part of the Error fingerprint.

From the Errbit README:

The way Errbit arranges notices into error groups is configurable. By default, Errbit uses the notice's error class, error message, complete backtrace, component (or controller), action and environment name to generate a unique fingerprint for every notice. Notices with identical fingerprints appear in the UI as different occurences of the same error and notices with differing fingerprints are displayed as separate errors.

Changing the fingerprinter (under the 'config' menu) applies to all apps and the change affects only notices that arrive after the change. If you want to refingerprint old notices, you can run rake errbit:notice_refingerprint.

Stephen Crosby
  • 1,157
  • 7
  • 19