Skip to content

Commit 9ba37ce

Browse files
authored
Merge pull request #95 from josephschorr/debug-trace
Move debug tracing into the Check request and response
2 parents b7d9cc6 + 78cdd78 commit 9ba37ce

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

authzed/api/v1/permission_service.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import "google/rpc/status.proto";
1010
import "validate/validate.proto";
1111

1212
import "authzed/api/v1/core.proto";
13+
import "authzed/api/v1/debug.proto";
1314

1415
// PermissionsService implements a set of RPCs that perform operations on
1516
// relationships and permissions.
@@ -334,6 +335,11 @@ message CheckPermissionRequest {
334335

335336
// context consists of named values that are injected into the caveat evaluation context
336337
google.protobuf.Struct context = 5 [ (validate.rules).message.required = false ];
338+
339+
// with_tracing, if true, indicates that the response should include a debug trace.
340+
// This can be useful for debugging and performance analysis, but adds a small amount
341+
// of compute overhead to the request.
342+
bool with_tracing = 6;
337343
}
338344

339345
message CheckPermissionResponse {
@@ -358,6 +364,9 @@ message CheckPermissionResponse {
358364

359365
// partial_caveat_info holds information of a partially-evaluated caveated response
360366
PartialCaveatInfo partial_caveat_info = 3 [ (validate.rules).message.required = false ];
367+
368+
// debug_trace is the debugging trace of this check, if requested.
369+
DebugInformation debug_trace = 4;
361370
}
362371

363372
// CheckBulkPermissionsRequest issues a check on whether a subject has permission

0 commit comments

Comments
 (0)