1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 17:44:59 +09:00

GO-3747 fix

This commit is contained in:
Roman Khafizianov 2024-07-10 18:47:47 +02:00
parent a9232dd702
commit 6bd5f1e17e
No known key found for this signature in database
GPG key ID: F07A7D55A2684852

View file

@ -88,9 +88,9 @@ func SharedLongMethodsInterceptor(ctx context.Context, req any, methodName strin
trace := debug.Stack(true)
// double check, because we can have a race and the stack trace can be taken after the method is already finished
if stackTraceHasMethod(methodName, trace) {
traceCompressed := debug.CompressBytes(trace)
lastTrace.Store(traceCompressed)
lastTrace.Store(string(trace))
if i == UnaryWarningInProgressIndex {
traceCompressed := debug.CompressBytes(trace)
l.With("ver", 2).With("in_progress", true).With("goroutines", traceCompressed).With("total", time.Since(start).Milliseconds()).Warnf("grpc unary request is taking too long")
}
}