Hi team FOR POC, I have deployed spicedb as a micr...
# spicedb
n
Hi team FOR POC, I have deployed spicedb as a microservice using its container, and another microservice which performs CRUD operations. On my local setup, everything is working as expected, but in dev environment is taking too much time to get the result from check permission
Copy code
Time difference between log 7 and log 8: 0.000 ms | Log Message: Making object
Time difference between log 8 and log 9: 9792.000 ms | Log Message: Completed CheckPermission request    ---------------------> client call for check permission
Time difference between log 9 and log 10: 0.000 ms | Log Message: Completed error handling and response creation
Time difference between log 10 and log 11: 0.000 ms | Log Message: Exiting CheckPermission
Time difference between log 11 and log 12: 0.000 ms | Log Message: [HTTP_RESPONSE_LOG] - - POST /check HTTP/1.1 200 197 9.793444993s
I am making the connection once, and using it everywhere
Copy code
var client *authzed.ClientWithExperimental

func Initialize() {
    var err error
    client, err = authzed.NewClientWithExperimentalAPIs(
        "host:port",
        grpcutil.WithInsecureBearerToken("mykey"),
        grpc.WithTransportCredentials(insecure.NewCredentials()),
    )
    if error...
}

func GetSpiceDB() *authzed.ClientWithExperimental {
    return client
}
I am trying to check where it is taking time in spicedb, but the only logs I am getting are
Copy code
{"level":"info","protocol":"grpc","grpc.component":"server","grpc.service":"authzed.api.v1.PermissionsService","grpc.method":"CheckPermission","grpc.method_type":"unary","requestID":"73814c9af5ac3abfb18b78464a1086da","peer.address":"324.234.234.234:3423","grpc.start_time":"2024-03-26T11:42:44Z","grpc.request.deadline":"2024-03-26T11:43:14Z","grpc.code":"OK","grpc.time_ms":59,"time":"2024-03-26T11:42:44Z","message":"finished call"}
...
And because we are directly using the spicedb container, we are not able to add logs to check where it is taking the time