MCPcopy Create free account
hub / github.com/cortexproject/cortex / recoverIngester

Function recoverIngester

pkg/ingester/ingester.go:3842–3857  ·  view source on GitHub ↗
(logger log.Logger, errp *error)

Source from the content-addressed store, hash-verified

3840}
3841
3842func 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.
3860func isHistogramValidationError(err error) bool {

Callers 8

QueryExemplarsMethod · 0.85
LabelValuesMethod · 0.85
LabelValuesStreamMethod · 0.85
LabelNamesMethod · 0.85
LabelNamesStreamMethod · 0.85
QueryStreamMethod · 0.85

Calls 3

WrapMethod · 0.65
LogMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected