(logger log.Logger, errp *error)
| 3840 | } |
| 3841 | |
| 3842 | func recoverIngester(logger log.Logger, errp *error) { |
| 3843 | e := recover() |
| 3844 | if e == nil { |
| 3845 | return |
| 3846 | } |
| 3847 | |
| 3848 | switch err := e.(type) { |
| 3849 | case runtime.Error: |
| 3850 | // Print the stack trace but do not inhibit the running application. |
| 3851 | buf := make([]byte, 64<<10) |
| 3852 | buf = buf[:runtime.Stack(buf, false)] |
| 3853 | |
| 3854 | level.Error(logger).Log("msg", "runtime panic in ingester", "err", err, "stacktrace", string(buf)) |
| 3855 | *errp = errors.Wrap(err, "unexpected error") |
| 3856 | } |
| 3857 | } |
| 3858 | |
| 3859 | // isHistogramValidationError checks if the error is a native histogram validation error. |
| 3860 | func isHistogramValidationError(err error) bool { |
no test coverage detected