ShouldLog returns whether the error should be logged and the reason. For example, if the error should be sampled return returned reason could be something like "sampled 1/10". The reason, if any, is used to decorate the error both in case the error should be logged or skipped.
(ctx context.Context)
| 32 | // return returned reason could be something like "sampled 1/10". The reason, if any, is used to decorate the error |
| 33 | // both in case the error should be logged or skipped. |
| 34 | ShouldLog(ctx context.Context) (bool, string) |
| 35 | } |
| 36 | |
| 37 | type DoNotLogError struct{ Err error } |
no outgoing calls