Skip to main content

SQL Introspection API

This page contains the reference of the introspection tables. To learn how to access the instrospection interface, check out the instrospection documentation.

Table: state

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
service_nameUtf8The name of the invoked service.
service_keyUtf8The key of the Virtual Object.
keyUtf8The utf8 state key.
value_utf8Utf8Only contains meaningful values when a service stores state as utf8. This is the case for services that serialize state using JSON (default for Typescript SDK, Java/Kotlin SDK if using JsonSerdes).
valueBinaryA binary, uninterpreted representation of the value. You can use the more specific column value_utf8 if the value is a string.

Table: sys_journal

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
idUtf8Invocation ID.
indexUInt32The index of this journal entry.
entry_typeUtf8The entry type. You can check all the available entry types in entries.rs.
nameUtf8The name of the entry supplied by the user, if any.
completedBooleanIndicates whether this journal entry has been completed; this is only valid for some entry types.
invoked_idUtf8If this entry represents an outbound invocation, indicates the ID of that invocation.
invoked_targetUtf8If this entry represents an outbound invocation, indicates the invocation Target. Format for plain services: ServiceName/HandlerName, e.g. Greeter/greet. Format for virtual objects/workflows: VirtualObjectName/Key/HandlerName, e.g. Greeter/Francesco/greet.
sleep_wakeup_atTimestampMillisecondIf this entry represents a sleep, indicates wakeup time.
promise_nameUtf8If this entry is a promise related entry (GetPromise, PeekPromise, CompletePromise), indicates the promise name.
rawBinaryRaw binary representation of the entry. Check the service protocol for more details to decode it.
versionUInt32The journal version.
entry_jsonUtf8The entry serialized as a JSON string (only relevant for journal version 2)
appended_atTimestampMillisecondWhen the entry was appended to the journal

Table: sys_keyed_service_status

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
service_nameUtf8The name of the invoked virtual object/workflow.
service_keyUtf8The key of the virtual object/workflow.
invocation_idUtf8Invocation ID.

Table: sys_inbox

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
service_nameUtf8The name of the invoked virtual object/workflow.
service_keyUtf8The key of the virtual object/workflow.
idUtf8Invocation ID.
sequence_numberUInt64Sequence number in the inbox.
created_atTimestampMillisecondTimestamp indicating the start of this invocation. DEPRECATED: you should not use this field anymore, but join with the sys_invocation table

Table: sys_idempotency

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
service_nameUtf8The name of the invoked service.
service_keyUtf8The key of the virtual object or the workflow ID. Null for regular services.
service_handlerUtf8The invoked handler.
idempotency_keyUtf8The user provided idempotency key.
invocation_idUtf8Invocation ID.

Table: sys_promise

Column nameTypeDescription
partition_keyUInt64Internal column that is used for partitioning the services invocations. Can be ignored.
service_nameUtf8The name of the workflow service.
service_keyUtf8The workflow ID.
keyUtf8The promise key.
completedBooleanTrue if the promise was completed.
completion_success_valueBinaryThe completion success, if any.
completion_success_value_utf8Utf8The completion success as UTF-8 string, if any.
completion_failureUtf8The completion failure, if any.

Table: sys_service

Column nameTypeDescription
nameUtf8The name of the registered user service.
revisionUInt64The latest deployed revision.
publicBooleanWhether the service is accessible through the ingress endpoint or not.
tyUtf8The service type. Either service or virtual_object or workflow.
deployment_idUtf8The ID of the latest deployment

Table: sys_deployment

Column nameTypeDescription
idUtf8The ID of the service deployment.
tyUtf8The type of the endpoint. Either http or lambda.
endpointUtf8The address of the endpoint. Either HTTP URL or Lambda ARN.
created_atTimestampMillisecondTimestamp indicating the deployment registration time.
min_service_protocol_versionUInt32Minimum supported protocol version.
max_service_protocol_versionUInt32Maximum supported protocol version.

Table: sys_invocation

Column nameTypeDescription
idUtf8Invocation ID.
targetUtf8Invocation Target. Format for plain services: ServiceName/HandlerName, e.g. Greeter/greet. Format for virtual objects/workflows: VirtualObjectName/Key/HandlerName, e.g. Greeter/Francesco/greet.
target_service_nameUtf8The name of the invoked service.
target_service_keyUtf8The key of the virtual object or the workflow ID. Null for regular services.
target_handler_nameUtf8The invoked handler.
target_service_tyUtf8The service type. Either service or virtual_object or workflow.
idempotency_keyUtf8Idempotency key, if any.
invoked_byUtf8Either: * ingress if the invocation was created externally. * service if the invocation was created by another Restate service. * subscription if the invocation was created by a subscription (e.g. Kafka).
invoked_by_service_nameUtf8The name of caller service if invoked_by = 'service'.
invoked_by_idUtf8The caller Invocation ID if invoked_by = 'service'.
invoked_by_subscription_idUtf8The subscription id if invoked_by = 'subscription'.
invoked_by_targetUtf8The caller invocation target if invoked_by = 'service'.
pinned_deployment_idUtf8The ID of the service deployment that started processing this invocation, and will continue to do so (e.g. for retries). This gets set after the first journal entry has been stored for this invocation.
pinned_service_protocol_versionUInt32The negotiated protocol version used for this invocation. This gets set after the first journal entry has been stored for this invocation.
trace_idUtf8The ID of the trace that is assigned to this invocation. Only relevant when tracing is enabled.
journal_sizeUInt32The number of journal entries durably logged for this invocation.
created_atTimestampMillisecondTimestamp indicating the start of this invocation.
modified_atTimestampMillisecondTimestamp indicating the last invocation status transition. For example, last time the status changed from invoked to suspended.
inboxed_atTimestampMillisecondTimestamp indicating when the invocation was inboxed, if ever.
scheduled_atTimestampMillisecondTimestamp indicating when the invocation was scheduled, if ever.
running_atTimestampMillisecondTimestamp indicating when the invocation first transitioned to running, if ever.
completed_atTimestampMillisecondTimestamp indicating when the invocation was completed, if ever.
retry_countUInt64The number of invocation attempts since the current leader started executing it. Increments on start, so a value greater than 1 means a failure occurred. Note: the value is not a global attempt counter across invocation suspensions and leadership changes.
last_start_atTimestampMillisecondTimestamp indicating the start of the most recent attempt of this invocation.
next_retry_atTimestampMillisecondTimestamp indicating the start of the next attempt of this invocation.
last_attempt_deployment_idUtf8The ID of the service deployment that executed the most recent attempt of this invocation; this is set before a journal entry is stored, but can change later.
last_attempt_serverUtf8Server/SDK version, e.g. restate-sdk-java/1.0.1
last_failureUtf8An error message describing the most recent failed attempt of this invocation, if any.
last_failure_error_codeUtf8The error code of the most recent failed attempt of this invocation, if any.
last_failure_related_entry_indexUInt64The index of the journal entry that caused the failure, if any. It may be out-of-bound of the currently stored entries in sys_journal.
last_failure_related_entry_nameUtf8The name of the journal entry that caused the failure, if any.
last_failure_related_entry_typeUtf8The type of the journal entry that caused the failure, if any. You can check all the available entry types in entries.rs.
statusUtf8Either pending or scheduled or ready or running or backing-off or suspended or completed.
completion_resultUtf8If status = 'completed', this contains either success or failure
completion_failureUtf8If status = 'completed' AND completion_result = 'failure', this contains the error cause