@@ -46,6 +46,8 @@ message CheckDebugTrace {
4646 }
4747
4848 // resource holds the resource on which the Check was performed.
49+ // for batched calls, the object_id field contains a comma-separated list of object IDs
50+ // for all the resources checked in the batch.
4951 ObjectReference resource = 1 [ (validate.rules ) .message.required = true ];
5052
5153 // permission holds the name of the permission or relation on which the Check was performed.
@@ -82,6 +84,21 @@ message CheckDebugTrace {
8284 // optional_expires_at is the time at which at least one of the relationships used to
8385 // compute this result, expires (if any). This is *not* related to the caching window.
8486 google.protobuf.Timestamp optional_expires_at = 10 ;
87+
88+ // trace_operation_id is a unique identifier for this trace's operation, that will
89+ // be shared for all traces created for the same check operation in SpiceDB.
90+ //
91+ // In cases where SpiceDB performs automatic batching of subproblems, this ID can be used
92+ // to correlate work that was shared across multiple traces.
93+ //
94+ // This identifier is generated by SpiceDB, is to be considered opaque to the caller
95+ // and only guaranteed to be unique within the same overall Check or CheckBulk operation.
96+ string trace_operation_id = 11 ;
97+
98+ // source holds the source of the result. It is of the form:
99+ // `<sourcetype>:<sourceid>`, where sourcetype can be, among others:
100+ // `spicedb`, `materialize`, etc.
101+ string source = 12 ;
85102}
86103
87104// CaveatEvalInfo holds information about a caveat expression that was evaluated.
0 commit comments