We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb2c3de commit f869669Copy full SHA for f869669
components/server/src/api/server.ts
@@ -215,6 +215,11 @@ export class API {
215
grpcServerHandled.labels(grpc_service, grpc_method, grpc_type, grpc_code).inc();
216
stopTimer({ grpc_code });
217
log.debug("public api: done", { grpc_code });
218
+ // If the request took too long, log it
219
+ const ctxTime = requestContext.startTime ? performance.now() - requestContext.startTime : 0;
220
+ if (grpc_type === "unary" && ctxTime > 5000) {
221
+ log.warn("public api: request took too long", { ctxTime, grpc_code });
222
+ }
223
};
224
const handleError = (reason: unknown) => {
225
const err = self.apiConverter.toError(reason);
0 commit comments