diff --git a/docs/references/restate-sql-introspection.mdx b/docs/references/restate-sql-introspection.mdx index a2e6f825..e0155270 100644 --- a/docs/references/restate-sql-introspection.mdx +++ b/docs/references/restate-sql-introspection.mdx @@ -34,11 +34,10 @@ The schema of these tables is described in the following. | `service_key_int32` | `Int32` | Only contains meaningful values when a service uses an `int32` Restate key. | `1337` | | `service_key_uuid` | `Utf8` | Only contains meaningful values for unkeyed Restate services. | `0189bab3b3397d828e979e2548980fa6` | | `status` | `Utf8` | Enum value: `invoked` or `suspended`. | | -| `invocation_id` | `Utf8` | Restate-generated invocation ID. | `0189baba86ea76b2a0efc37db88ea9a5` | -| `sid` | `Utf8` | Service invocation ID, an opaque token that can be used to cancel an invocation of a service with the [admin API](/references/admin-api). | | +| `id` | `Utf8` | [Invocation ID](/services/invocation#invocation-identifier), an opaque token that can be used to cancel an invocation of a service with the [admin API](/references/admin-api). | | | `invoked_by` | `Utf8` | Enum describing the invoker of this service: `ingress` = invoked externally / `service` = invoked by a service. | | | `invoked_by_service` | `Utf8` | The name of the invoking service. Or `null` if invoked via the ingress. | `com.example.Greeter` | -| `invoked_by_sid` | `Utf8` | The service invocation ID of the service that triggered this invocation. Or `null` if invoked via the ingress. | | +| `invoked_by_id` | `Utf8` | The Invocation ID of the service that triggered this invocation. Or `null` if invoked externally. | | | `trace_id` | `Utf8` | The ID of the trace that is assigned to this invocation. Only relevant when tracing is enabled. | | | `journal_size` | `UInt32` | The number of journal entries durably logged for this invocation. | | | `created_at` | `Date64` | Timestamp indicating the start of this invocation. | | diff --git a/docs/restate/logging.md b/docs/restate/logging.md index 63a3f376..f0ccb7bd 100644 --- a/docs/restate/logging.md +++ b/docs/restate/logging.md @@ -36,7 +36,7 @@ Most log events generated by Restate will also have the following attached attri * `rpc.service`: The related service * `rpc.method`: The related method -* `restate.invocation.sid`: The [service invocation identifier](/services/invocation#service-invocation-identifier) +* `restate.invocation.id`: The [invocation identifier](/services/invocation#invocation-identifier) ## Recommendations diff --git a/docs/restate/managed_service.md b/docs/restate/managed_service.md index f7e29c4a..5105b37d 100644 --- a/docs/restate/managed_service.md +++ b/docs/restate/managed_service.md @@ -57,11 +57,11 @@ Grafana supports correlating logs and traces. In your Loki data source configura set up a [Derived field](https://grafana.com/docs/grafana/latest/datasources/loki/configure-loki-data-source/#derived-fields) with the following parameters: ```yaml -name: restate.invocation.sid +name: restate.invocation.id # pull invocation ids out of logs -regex: '"restate.invocation.sid":"(.+?)"' # single quotes not needed +regex: '"restate.invocation.id":"(.+?)"' # single quotes not needed # find traces with that invocation id -query: '{ .restate.invocation.sid="${__value.raw}" }' # single quotes not needed +query: '{ .restate.invocation.id="${__value.raw}" }' # single quotes not needed internal_link: enabled: true data_source: @@ -69,7 +69,7 @@ internal_link: In your Tempo configuration, after you have a Loki data source configured, set up [Trace to logs](https://grafana.com/docs/grafana/latest/datasources/tempo/#trace-to-logs) with data source set to your Loki data source, -and query set to `{kubernetes_container_name="restate"} |= "${__span.tags["restate.invocation.sid"]}"`. +and query set to `{kubernetes_container_name="restate"} |= "${__span.tags["restate.invocation.id"]}"`. You can view logs in Grafana on the explore page by selecting the Loki data source. To get started you can query: ```logql diff --git a/docs/restate/tracing.md b/docs/restate/tracing.md index 514e16a0..49b56db9 100644 --- a/docs/restate/tracing.md +++ b/docs/restate/tracing.md @@ -80,9 +80,9 @@ You can import the trace files using the Jaeger UI: ## Understanding traces The traces contain detailed information about the context calls that were done during the invocation (e.g. sleep, one-way calls, interaction with state): -![Understanding traces](/img/understanding_traces.png) +![Understanding traces](/img/jaeger_tour_background_call_handler.png) -The initial `ingress_service_invocation` spans show when the gRPC/Connect HTTP request was received by Restate. The `invoke` span beneath it shows when Restate invoked the service endpoint to process the request. +The initial `ingress_invoke` spans show when the gRPC/Connect HTTP request was received by Restate. The `invoke` span beneath it shows when Restate invoked the service endpoint to process the request. The tags of the spans contain the metadata of the context calls (e.g. call arguments, invocation id). @@ -90,11 +90,11 @@ When a service invokes another service, the child invocation is linked automatic Note that the spans of one-way calls are shown as separate traces. The parent invocation only shows that the one-way call was scheduled, not its entire tracing span. To see this information, search for the trace of the one-way call by filtering on the invocation id tag: ``` -restate.invocation.sid="example.MyExampleService-AzEyMw==-0189b536906b746c8da6f83f0257acda" +restate.invocation.id="T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE" ``` ## Searching traces -Traces export attributes and tags that correlate the trace with the service and/or invocation. For example, in the Jaeger UI, you can filter on the invocation id (`restate.invocation.sid`) or any other tag: +Traces export attributes and tags that correlate the trace with the service and/or invocation. For example, in the Jaeger UI, you can filter on the invocation id (`restate.invocation.id`) or any other tag: -![Jaeger invocation id search](/img/jaeger_docs_invocationid_search.png) \ No newline at end of file +![Jaeger invocation id search](/img/jaeger_invocationid_search_handler.png) \ No newline at end of file diff --git a/docs/services/introspection.md b/docs/services/introspection.md index ae64da8a..4c36a8cc 100644 --- a/docs/services/introspection.md +++ b/docs/services/introspection.md @@ -9,7 +9,7 @@ draft: false Restate exposes information on invocations and application state via its Introspection SQL API. You can use this to gain insight into the status of invocations and the service state that is stored. -This can be useful for troubleshooting. For example, a handler might be blocked for a specific key, and you want to kill the invocation that is blocking it but you don't know the service invocation ID. Or you want to check what is currently stored in the state of a service. +This can be useful for troubleshooting. For example, a handler might be blocked for a specific key, and you want to kill the invocation that is blocking it but you don't know the invocation ID. Or you want to check what is currently stored in the state of a service. To let you do this, Restate exposes two SQL tables that you can query via the [*psql* client](https://www.postgresql.org/docs/current/app-psql.html): - `sys_status` table to inspect invocation status. @@ -51,33 +51,33 @@ This following list contains some key queries on the `sys_status` table to give select * from sys_status; ``` -- Retrieve the service invocation ID (`sid`) that is currently blocking a service-key combination via: +- Retrieve the invocation ID (`id`) that is currently blocking a service-key combination via: ```sql - select method, status, sid from sys_status where service = 'test.MyServiceName' and service_key_utf8 = 'myKey'; + select method, status, id from sys_status where service = 'test.MyServiceName' and service_key_utf8 = 'myKey'; ``` - You can then use the service invocation ID to kill the invocation via the [admin API](/references/admin-api#tag/invocation/operation/cancel_invocation). + You can then use the invocation ID to [kill the invocation](./invocation.md#cancel-an-invocation). - Check the status of an invocation via: ```sql - select service, method, status from sys_status where sid = 'my_sid'; + select service, method, status from sys_status where id = 'T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE'; ``` The status field shows that the invocation is either in status `invoked`, meaning actively processing, or in status is `suspended`, meaning waiting on some external input (e.g. request-response call, awakeable, sleep, ...). - Check when an invocation was modified the last time via: ```sql - select modified_at from sys_status where sid = 'my_sid'; + select modified_at from sys_status where id = 'T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE'; ``` This includes any modification to the row in the table (e.g. when the service last switched its status from `invoked` to `suspended`, or when the last journal entry was added). - To find out if an invocation was triggered via the ingress or by another service: ```sql - select invoked_by, invoked_by_service, invoked_by_sid from sys_status where sid = 'my_sid'; + select invoked_by, invoked_by_service, invoked_by_id from sys_status where id = 'T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE'; ``` - The `invoked_by` field contains either `ingress` or `service`. If the invocation was triggered by another service, then the fields `invoked_by_service` and `invoked_by_sid` will supply more information about the invoking service. + The `invoked_by` field contains either `ingress` or `service`. If the invocation was triggered by another service, then the fields `invoked_by_service` and `invoked_by_id` will supply more information about the invoking service. -- Retrieve the trace ID based on a service invocation ID: +- Retrieve the trace ID based on a invocation ID: ```sql - select trace_id from sys_status where sid = 'my_sid'; + select trace_id from sys_status where id = 'T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE'; ``` Afterwards, you can use this trace ID to [search for spans in Jaeger](/restate/tracing#searching-traces). diff --git a/docs/services/invocation.md b/docs/services/invocation.md index d1d32b3f..48ff102f 100644 --- a/docs/services/invocation.md +++ b/docs/services/invocation.md @@ -73,7 +73,7 @@ For example, using [Connect](#connect-grpc-on-http) and `curl`: curl -X POST http:///dev.restate.Ingress/Invoke -H 'content-type: application/json' -d '{"service": "org.example.Greeter", "method": "Greet", "payload": {"name": "Pete"}}' ``` -The response contains the [service invocation identifier](/services/invocation#service-invocation-identifier). You can use this identifier to manage the invocation as described in [the respective documention](/services/invocation). +The response contains the [Invocation identifier](#invocation-identifier). You can use this identifier to cancel or kill the invocation as described in [the below paragraph](#cancel-an-invocation). For a complete documentation of the `dev.restate.Ingress` built-in service, check out the [Restate protobuf definitions](https://github.com/restatedev/proto/blob/main/dev/restate/services.proto). @@ -103,11 +103,11 @@ For more details on the API, refer to the [admin API docs](/references/admin-api Restate offers several tools to manage the ongoing invocations. -## Service invocation identifier +## Invocation identifier -Every invocation to a service gets a unique identifier assigned by Restate, called _Service invocation identifier_. You can use this identifier to filter your structured logs, find traces, and execute some management operations such as cancelling an invocation. +Every invocation to a service gets a unique identifier assigned by Restate, called _Invocation identifier_. You can use this identifier to filter your structured logs, find traces, and execute some management operations such as cancelling an invocation. -You can find this identifier in the runtime logs and OpenTelementry traces by looking for the `restate.invocation.sid`, for example: +You can find this identifier in the runtime logs and OpenTelementry traces by looking for the `restate.invocation.id`, for example: ```log {7} 2023-05-19T15:02:28.656467Z INFO restate_invoker::invocation_task @@ -116,12 +116,12 @@ You can find this identifier in the runtime logs and OpenTelementry traces by lo in restate_invoker::invocation_task::invoker_invocation_task rpc.system: "restate" rpc.service: coordinator.Coordinator - restate.invocation.sid: coordinator.Coordinator-AYguNHjOdG+gM+TY9k1qeA==-01882e3478ce79579999ecabfd7f4129 + restate.invocation.id: T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE ``` :::note -The service invocation identifier is opaque and its current format should not be relied on, as it might change in future Restate versions. +The Invocation identifier is opaque and its current format should not be relied on, as it might change in future Restate versions. ::: @@ -152,13 +152,13 @@ Killing an invocation might leave the service instance in an inconsistent state, To kill an invocation, send the following request to the Restate meta endpoint: ```shell -$ curl -X DELETE /invocations -H 'content-type: application/json' -d '{"sid": ""}' +$ curl -X DELETE /invocations/ ``` For example: ```shell -$ curl -X DELETE http://localhost:8081/invocations -H 'content-type: application/json' -d '{"sid": "coordinator.Coordinator-AYguNHjOdG+gM+TY9k1qeA==-01882e3478ce79579999ecabfd7f4129"}' +$ curl -X DELETE http://localhost:8081/invocations/T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE ``` For more details on the API, refer to the [admin API docs](/references/admin-api). diff --git a/docs/tour.mdx b/docs/tour.mdx index 38240275..dfa6896a 100644 --- a/docs/tour.mdx +++ b/docs/tour.mdx @@ -286,15 +286,15 @@ Have a look at the SDK and runtime logs, to see how the ingress request triggers
Show the logs ```log -[restate] [2023-08-15T20:53:51.026Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Invoking function. -[restate] [2023-08-15T20:53:51.026Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Adding message to journal and sending to Restate ; InvokeEntryMessage -[restate] [2023-08-15T20:53:51.027Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Scheduling suspension in 30000 ms -[restate] [2023-08-15T20:53:51.029Z] DEBUG: [.TicketService-AzQ1Ng==-0189faf9ef33752f84e8c7847020c05b] [reserve] : Invoking function. -[restate] [2023-08-15T20:53:51.029Z] DEBUG: [.TicketService-AzQ1Ng==-0189faf9ef33752f84e8c7847020c05b] [reserve] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T20:53:51.029Z] DEBUG: [.TicketService-AzQ1Ng==-0189faf9ef33752f84e8c7847020c05b] [reserve] : Function completed successfully. -[restate] [2023-08-15T20:53:51.031Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Received completion message from Restate, adding to journal. ; CompletionMessage -[restate] [2023-08-15T20:53:51.031Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T20:53:51.031Z] DEBUG: [.UserSession-AzEyMw==-0189faf9ef2e7f6398703e1784dab8ba] [addTicket] : Function completed successfully. +[restate] [2023-08-15T20:53:51.026Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Invoking function. +[restate] [2023-08-15T20:53:51.026Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Adding message to journal and sending to Restate ; InvokeEntryMessage +[restate] [2023-08-15T20:53:51.027Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T20:53:51.029Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHEvH1866jAt-dCQtFY] : Invoking function. +[restate] [2023-08-15T20:53:51.029Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHEvH1866jAt-dCQtFY] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T20:53:51.029Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHEvH1866jAt-dCQtFY] : Function completed successfully. +[restate] [2023-08-15T20:53:51.031Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-15T20:53:51.031Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T20:53:51.031Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHDd1Z6crtc63up0wAD] : Function completed successfully. ```
@@ -354,21 +354,21 @@ Once the runtime has received the response, it invokes the `addTicket` function
Show the logs ```log -[restate] [2023-08-15T20:58:25.433Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Invoking function. -[restate] [2023-08-15T20:58:25.434Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Adding message to journal and sending to Restate ; InvokeEntryMessage +[restate] [2023-08-15T20:58:25.433Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Invoking function. +[restate] [2023-08-15T20:58:25.434Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Adding message to journal and sending to Restate ; InvokeEntryMessage //highlight-next-line -[restate] [2023-08-15T20:58:25.434Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Scheduling suspension in 30000 ms -[restate] [2023-08-15T20:58:25.436Z] DEBUG: [.TicketService-AzQ1Ng==-0189fafe1f1a7306bed0d0fa18b1e86a] [reserve] : Invoking function. -[restate] [2023-08-15T20:58:55.436Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-15T20:58:25.434Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T20:58:25.436Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHF0pNxZqnhNkoJPdn7] : Invoking function. +[restate] [2023-08-15T20:58:55.436Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Writing suspension message to journal. ; SuspensionMessage //highlight-next-line -[restate] [2023-08-15T20:58:55.438Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Suspending function. -[restate] [2023-08-15T20:59:00.440Z] DEBUG: [.TicketService-AzQ1Ng==-0189fafe1f1a7306bed0d0fa18b1e86a] [reserve] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T20:59:00.441Z] DEBUG: [.TicketService-AzQ1Ng==-0189fafe1f1a7306bed0d0fa18b1e86a] [reserve] : Function completed successfully. +[restate] [2023-08-15T20:58:55.438Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Suspending function. +[restate] [2023-08-15T20:59:00.440Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHF0pNxZqnhNkoJPdn7] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T20:59:00.441Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHF0pNxZqnhNkoJPdn7] : Function completed successfully. //highlight-next-line -[restate] [2023-08-15T20:59:00.458Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Resuming (replaying) function. -[restate] [2023-08-15T20:59:00.459Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Matched and replayed message from journal ; InvokeEntryMessage -[restate] [2023-08-15T20:59:00.460Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T20:59:00.460Z] DEBUG: [.UserSession-AzEyMw==-0189fafe1f137b0ea61da1a4101fd208] [addTicket] : Function completed successfully. +[restate] [2023-08-15T20:59:00.458Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Resuming (replaying) function. +[restate] [2023-08-15T20:59:00.459Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Matched and replayed message from journal ; InvokeEntryMessage +[restate] [2023-08-15T20:59:00.460Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T20:59:00.460Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHF0pFyZoYvJ5G_WZMF] : Function completed successfully. ```
@@ -402,15 +402,15 @@ const checkout = async (ctx: restate.RpcContext, userId: string) => { Call the `UserSession/checkout` function as we did earlier and have a look at the logs again to see what happened: ```log -[restate] [2023-08-15T21:06:12.672Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Invoking function. -[restate] [2023-08-15T21:06:12.673Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Adding message to journal and sending to Restate ; InvokeEntryMessage -[restate] [2023-08-15T21:06:12.674Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-15T21:06:12.676Z] DEBUG: [.Checkout-AYn7BUBCcdaPpU82du023A==-0189fb0540427157b40340ad8e574f28] [checkout] : Invoking function. -[restate] [2023-08-15T21:06:12.677Z] DEBUG: [.Checkout-AYn7BUBCcdaPpU82du023A==-0189fb0540427157b40340ad8e574f28] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:06:12.677Z] DEBUG: [.Checkout-AYn7BUBCcdaPpU82du023A==-0189fb0540427157b40340ad8e574f28] [checkout] : Function completed successfully. -[restate] [2023-08-15T21:06:12.679Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage -[restate] [2023-08-15T21:06:12.679Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:06:12.679Z] DEBUG: [.UserSession-AzEyMw==-0189fb05403b7d749374ba08e256a857] [checkout] : Function completed successfully. +[restate] [2023-08-15T21:06:12.672Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Invoking function. +[restate] [2023-08-15T21:06:12.673Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Adding message to journal and sending to Restate ; InvokeEntryMessage +[restate] [2023-08-15T21:06:12.674Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T21:06:12.676Z] DEBUG: [Checkout/checkout] [H32MEMFENfUBiiHHQJxy5oLQ-W4akbii] : Invoking function. +[restate] [2023-08-15T21:06:12.677Z] DEBUG: [Checkout/checkout] [H32MEMFENfUBiiHHQJxy5oLQ-W4akbii] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:06:12.677Z] DEBUG: [Checkout/checkout] [H32MEMFENfUBiiHHQJxy5oLQ-W4akbii] : Function completed successfully. +[restate] [2023-08-15T21:06:12.679Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-15T21:06:12.679Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:06:12.679Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHHQJdwvLuBqEHXFQU3] : Function completed successfully. ``` Notice that the `UserSession` did not get suspended because the response came before the suspension timeout hit. @@ -447,16 +447,16 @@ In the service logs, you see that the `addTicket` function doesn't wait for a re
Show the logs ```log -[restate] [2023-08-15T21:09:59.681Z] DEBUG: [.UserSession-AzEyMw==-0189fb08b6fb7aa99487f36af3c1f36a] [addTicket] : Invoking function. +[restate] [2023-08-15T21:09:59.681Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHJmC53vpTRfQdpRgKE] : Invoking function. //highlight-next-line -[restate] [2023-08-15T21:09:59.682Z] DEBUG: [.UserSession-AzEyMw==-0189fb08b6fb7aa99487f36af3c1f36a] [addTicket] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage -[restate] [2023-08-15T21:09:59.683Z] DEBUG: [.UserSession-AzEyMw==-0189fb08b6fb7aa99487f36af3c1f36a] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:09:59.682Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHJmC53vpTRfQdpRgKE] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage +[restate] [2023-08-15T21:09:59.683Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHJmC53vpTRfQdpRgKE] : Journaled and sent output message ; OutputStreamEntryMessage //highlight-next-line -[restate] [2023-08-15T21:09:59.683Z] DEBUG: [.UserSession-AzEyMw==-0189fb08b6fb7aa99487f36af3c1f36a] [addTicket] : Function completed successfully. -[restate] [2023-08-15T21:09:59.686Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb08b70476039ae58b6d7d460028] [reserve] : Invoking function. -[restate] [2023-08-15T21:10:34.688Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb08b70476039ae58b6d7d460028] [reserve] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:09:59.683Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHJmC53vpTRfQdpRgKE] : Function completed successfully. +[restate] [2023-08-15T21:09:59.686Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHJmDBwp6kJ82nETxIy]: Invoking function. +[restate] [2023-08-15T21:10:34.688Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHJmDBwp6kJ82nETxIy]: Journaled and sent output message ; OutputStreamEntryMessage //highlight-next-line -[restate] [2023-08-15T21:10:34.689Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb08b70476039ae58b6d7d460028] [reserve] : Function completed successfully. +[restate] [2023-08-15T21:10:34.689Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHJmDBwp6kJ82nETxIy]: Function completed successfully. ```
@@ -496,15 +496,15 @@ curl -X POST http://localhost:9090/UserSession/expireTicket -H 'content-type: ap Have a look at the logs again to see what happened: ```log -[restate] [2023-08-15T21:13:54.707Z] DEBUG: [.UserSession-AzEyMw==-0189fb0c4d0f729da703e6d8aec271bb] [expireTicket] : Invoking function. -[restate] [2023-08-15T21:13:54.708Z] DEBUG: [.UserSession-AzEyMw==-0189fb0c4d0f729da703e6d8aec271bb] [expireTicket] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage -[restate] [2023-08-15T21:13:54.708Z] DEBUG: [.UserSession-AzEyMw==-0189fb0c4d0f729da703e6d8aec271bb] [expireTicket] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:13:54.707Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHLgq92RZrEuQ502v1K] : Invoking function. +[restate] [2023-08-15T21:13:54.708Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHLgq92RZrEuQ502v1K] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage +[restate] [2023-08-15T21:13:54.708Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHLgq92RZrEuQ502v1K] : Journaled and sent output message ; OutputStreamEntryMessage //highlight-next-line -[restate] [2023-08-15T21:13:54.709Z] DEBUG: [.UserSession-AzEyMw==-0189fb0c4d0f729da703e6d8aec271bb] [expireTicket] : Function completed successfully. -[restate] [2023-08-15T21:13:54.713Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb0c4d15798fadce894d9078e3f7] [unreserve] : Invoking function. -[restate] [2023-08-15T21:13:54.713Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb0c4d15798fadce894d9078e3f7] [unreserve] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:13:54.709Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHLgq92RZrEuQ502v1K] : Function completed successfully. +[restate] [2023-08-15T21:13:54.713Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHLgrFz6rkvK_3tRk6Z] : Invoking function. +[restate] [2023-08-15T21:13:54.713Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHLgrFz6rkvK_3tRk6Z] : Journaled and sent output message ; OutputStreamEntryMessage //highlight-next-line -[restate] [2023-08-15T21:13:54.713Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb0c4d15798fadce894d9078e3f7] [unreserve] : Function completed successfully. +[restate] [2023-08-15T21:13:54.713Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHLgrFz6rkvK_3tRk6Z] : Function completed successfully. ``` @@ -552,21 +552,21 @@ The `addTicket` function did a one-way call to the `reserve` function so did not
Show the logs ```log -[restate] [2023-08-15T21:20:50.312Z] DEBUG: [.UserSession-AzEyMw==-0189fb12a48370b1bf6f9cade272c460] [addTicket] : Invoking function. -[restate] [2023-08-15T21:20:50.313Z] DEBUG: [.UserSession-AzEyMw==-0189fb12a48370b1bf6f9cade272c460] [addTicket] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage -[restate] [2023-08-15T21:20:50.314Z] DEBUG: [.UserSession-AzEyMw==-0189fb12a48370b1bf6f9cade272c460] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:20:50.314Z] DEBUG: [.UserSession-AzEyMw==-0189fb12a48370b1bf6f9cade272c460] [addTicket] : Function completed successfully. -[restate] [2023-08-15T21:20:50.317Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Invoking function. -[restate] [2023-08-15T21:20:50.317Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Adding message to journal and sending to Restate ; SleepEntryMessage +[restate] [2023-08-15T21:20:50.312Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHMg255bahRoMD2cNRH] : Invoking function. +[restate] [2023-08-15T21:20:50.313Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHMg255bahRoMD2cNRH] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage +[restate] [2023-08-15T21:20:50.314Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHMg255bahRoMD2cNRH] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:20:50.314Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHMg255bahRoMD2cNRH] : Function completed successfully. +[restate] [2023-08-15T21:20:50.317Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Invoking function. +[restate] [2023-08-15T21:20:50.317Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Adding message to journal and sending to Restate ; SleepEntryMessage // highlight-start -[restate] [2023-08-15T21:20:50.317Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Scheduling suspension in 30000 ms -[restate] [2023-08-15T21:21:20.319Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Writing suspension message to journal. ; SuspensionMessage -[restate] [2023-08-15T21:21:20.320Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Suspending function. -[restate] [2023-08-15T21:21:25.342Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Resuming (replaying) function. +[restate] [2023-08-15T21:20:50.317Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T21:21:20.319Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-15T21:21:20.320Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Suspending function. +[restate] [2023-08-15T21:21:25.342Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Resuming (replaying) function. // highlight-end -[restate] [2023-08-15T21:21:25.342Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Matched and replayed message from journal ; SleepEntryMessage -[restate] [2023-08-15T21:21:25.342Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:21:25.343Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb12a48b7250ac6bd35b29025514] [reserve] : Function completed successfully. +[restate] [2023-08-15T21:21:25.342Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Matched and replayed message from journal ; SleepEntryMessage +[restate] [2023-08-15T21:21:25.342Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:21:25.343Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHMg3F8P4i8kn5RHEEj] : Function completed successfully. ```
@@ -596,27 +596,27 @@ Finally, we see the responses of both functions coming in.
Show the logs ```log -[restate] [2023-08-15T21:23:49.536Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Invoking function. -[restate] [2023-08-15T21:23:49.537Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Adding message to journal and sending to Restate ; InvokeEntryMessage -[restate] [2023-08-15T21:23:49.538Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Scheduling suspension in 30000 ms -[restate] [2023-08-15T21:23:49.540Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Invoking function. -[restate] [2023-08-15T21:23:49.540Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Adding message to journal and sending to Restate ; SleepEntryMessage -[restate] [2023-08-15T21:23:49.540Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T21:23:49.536Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Invoking function. +[restate] [2023-08-15T21:23:49.537Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Adding message to journal and sending to Restate ; InvokeEntryMessage +[restate] [2023-08-15T21:23:49.538Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Scheduling suspension in 30000 ms +[restate] [2023-08-15T21:23:49.540Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Invoking function. +[restate] [2023-08-15T21:23:49.540Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Adding message to journal and sending to Restate ; SleepEntryMessage +[restate] [2023-08-15T21:23:49.540Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Scheduling suspension in 30000 ms // highlight-start -[restate] [2023-08-15T21:24:19.541Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Writing suspension message to journal. ; SuspensionMessage -[restate] [2023-08-15T21:24:19.547Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Suspending function. -[restate] [2023-08-15T21:24:19.551Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Writing suspension message to journal. ; SuspensionMessage -[restate] [2023-08-15T21:24:19.552Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Suspending function. -[restate] [2023-08-15T21:24:24.555Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Resuming (replaying) function. +[restate] [2023-08-15T21:24:19.541Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-15T21:24:19.547Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Suspending function. +[restate] [2023-08-15T21:24:19.551Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-15T21:24:19.552Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Suspending function. +[restate] [2023-08-15T21:24:24.555Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Resuming (replaying) function. // highlight-end -[restate] [2023-08-15T21:24:24.556Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Matched and replayed message from journal ; SleepEntryMessage -[restate] [2023-08-15T21:24:24.557Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:24:24.557Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1560a27295aaf760dc3ceec21a] [reserve] : Function completed successfully. +[restate] [2023-08-15T21:24:24.556Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Matched and replayed message from journal ; SleepEntryMessage +[restate] [2023-08-15T21:24:24.557Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:24:24.557Z] DEBUG: [TicketService/reserve] [IwF2v7ci3eUBiiHN6gh7cpkCpv4OREYE] : Function completed successfully. // highlight-next-line -[restate] [2023-08-15T21:24:24.564Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Resuming (replaying) function. -[restate] [2023-08-15T21:24:24.565Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Matched and replayed message from journal ; InvokeEntryMessage -[restate] [2023-08-15T21:24:24.565Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:24:24.565Z] DEBUG: [.UserSession-AzEyMw==-0189fb15609976f1867159b49ab5c704] [addTicket] : Function completed successfully. +[restate] [2023-08-15T21:24:24.564Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Resuming (replaying) function. +[restate] [2023-08-15T21:24:24.565Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Matched and replayed message from journal ; InvokeEntryMessage +[restate] [2023-08-15T21:24:24.565Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:24:24.565Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHN6ft5nYhPYl4Q3r4Y] : Function completed successfully. ```
@@ -668,19 +668,19 @@ To test it out, put the delay to a lower value (e.g. 5 seconds), call the `addTi ```logs ... logs from reserve call ... -[restate] [2023-08-15T21:29:44.426Z] DEBUG: [.UserSession-AzEyMw==-0189fb1a420e7c80a1382f753661bf8a] [addTicket] : Matched and replayed message from journal ; InvokeEntryMessage +[restate] [2023-08-15T21:29:44.426Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHT-at6er1g5Tkk14Ni] : Matched and replayed message from journal ; InvokeEntryMessage // highlight-next-line -[restate] [2023-08-15T21:29:44.427Z] DEBUG: [.UserSession-AzEyMw==-0189fb1a420e7c80a1382f753661bf8a] [addTicket] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage -[restate] [2023-08-15T21:29:44.427Z] DEBUG: [.UserSession-AzEyMw==-0189fb1a420e7c80a1382f753661bf8a] [addTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:29:44.427Z] DEBUG: [.UserSession-AzEyMw==-0189fb1a420e7c80a1382f753661bf8a] [addTicket] : Function completed successfully. +[restate] [2023-08-15T21:29:44.427Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHT-at6er1g5Tkk14Ni] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage +[restate] [2023-08-15T21:29:44.427Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHT-at6er1g5Tkk14Ni] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:29:44.427Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHT-at6er1g5Tkk14Ni] : Function completed successfully. // highlight-next-line -[restate] [2023-08-15T21:29:49.442Z] DEBUG: [.UserSession-AzEyMw==-0189fb1acaeb7a97aa3c9a07acdd9014] [expireTicket] : Invoking function. -[restate] [2023-08-15T21:29:49.443Z] DEBUG: [.UserSession-AzEyMw==-0189fb1acaeb7a97aa3c9a07acdd9014] [expireTicket] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage -[restate] [2023-08-15T21:29:49.444Z] DEBUG: [.UserSession-AzEyMw==-0189fb1acaeb7a97aa3c9a07acdd9014] [expireTicket] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:29:49.444Z] DEBUG: [.UserSession-AzEyMw==-0189fb1acaeb7a97aa3c9a07acdd9014] [expireTicket] : Function completed successfully. -[restate] [2023-08-15T21:29:49.456Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1ade86708e920b9043b26ada0a] [unreserve] : Invoking function. -[restate] [2023-08-15T21:29:49.457Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1ade86708e920b9043b26ada0a] [unreserve] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-15T21:29:49.457Z] DEBUG: [.TicketService-AzQ1Ng==-0189fb1ade86708e920b9043b26ada0a] [unreserve] : Function completed successfully. +[restate] [2023-08-15T21:29:49.442Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHU-694wqUVn-2P15Au] : Invoking function. +[restate] [2023-08-15T21:29:49.443Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHU-694wqUVn-2P15Au] : Adding message to journal and sending to Restate ; BackgroundInvokeEntryMessage +[restate] [2023-08-15T21:29:49.444Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHU-694wqUVn-2P15Au] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:29:49.444Z] DEBUG: [UserSession/expireTicket] [K1qex52CPYkBiiHU-694wqUVn-2P15Au] : Function completed successfully. +[restate] [2023-08-15T21:29:49.456Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHT-bh91JO16nzGk-X0] : Invoking function. +[restate] [2023-08-15T21:29:49.457Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHT-bh91JO16nzGk-X0] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-15T21:29:49.457Z] DEBUG: [TicketService/unreserve] [IwF2v7ci3eUBiiHT-bh91JO16nzGk-X0] : Function completed successfully. ``` @@ -768,8 +768,8 @@ Run the services and call the `addTicket` function, to see the interaction with ```log ... logs from reserve call ... // highlight-start -[restate] [2023-08-16T07:32:02.415Z] DEBUG: [.UserSession-AzEyMw==-0189fd41adfe7b5a8b2d9d282e10db17] [addTicket] : Adding message to journal and sending to Restate ; GetStateEntryMessage -[restate] [2023-08-16T07:32:02.415Z] DEBUG: [.UserSession-AzEyMw==-0189fd41adfe7b5a8b2d9d282e10db17] [addTicket] : Adding message to journal and sending to Restate ; SetStateEntryMessage +[restate] [2023-08-16T07:32:02.415Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHVZ9t6j52X1BcPKa1N] : Adding message to journal and sending to Restate ; GetStateEntryMessage +[restate] [2023-08-16T07:32:02.415Z] DEBUG: [UserSession/addTicket] [K1qex52CPYkBiiHVZ9t6j52X1BcPKa1N] : Adding message to journal and sending to Restate ; SetStateEntryMessage // highlight-end ... logs from expireTicket call ... ``` @@ -1011,26 +1011,26 @@ Have a look at the logs to see what happens. ```log ... logs of `UserSession/checkout` ... -[restate] [2023-08-16T08:00:37.965Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Invoking function. -[restate] [2023-08-16T08:00:37.966Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:00:37.966Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:00:37.967Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:00:37.965Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Invoking function. +[restate] [2023-08-16T08:00:37.966Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:00:37.966Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:00:37.967Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Received completion message from Restate, adding to journal. ; CompletionMessage //highlight-next-line My idempotency key: dd92178a-85ca-4002-bfd5-0f3ed167317d -[restate] [2023-08-16T08:00:37.967Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Adding message to journal and sending to Restate ; SleepEntryMessage -[restate] [2023-08-16T08:00:37.967Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:01:07.965Z] DEBUG: [.UserSession-AzEyMw==-0189fd5c6448790698813740d336f51f] [checkout] : Writing suspension message to journal. ; SuspensionMessage -[restate] [2023-08-16T08:01:07.966Z] DEBUG: [.UserSession-AzEyMw==-0189fd5c6448790698813740d336f51f] [checkout] : Suspending function. -[restate] [2023-08-16T08:01:07.967Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Writing suspension message to journal. ; SuspensionMessage -[restate] [2023-08-16T08:01:07.967Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Suspending function. +[restate] [2023-08-16T08:00:37.967Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Adding message to journal and sending to Restate ; SleepEntryMessage +[restate] [2023-08-16T08:00:37.967Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:01:07.965Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-16T08:01:07.966Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Suspending function. +[restate] [2023-08-16T08:01:07.967Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Writing suspension message to journal. ; SuspensionMessage +[restate] [2023-08-16T08:01:07.967Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Suspending function. //highlight-next-line -[restate] [2023-08-16T08:01:08.981Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Resuming (replaying) function. -[restate] [2023-08-16T08:01:08.983Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Matched and replayed message from journal ; undefined +[restate] [2023-08-16T08:01:08.981Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Resuming (replaying) function. +[restate] [2023-08-16T08:01:08.983Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Matched and replayed message from journal ; undefined //highlight-next-line My idempotency key: dd92178a-85ca-4002-bfd5-0f3ed167317d -[restate] [2023-08-16T08:01:08.983Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Matched and replayed message from journal ; SleepEntryMessage -[restate] [2023-08-16T08:01:08.984Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-16T08:01:08.984Z] DEBUG: [.Checkout-AYn9XGRLda+dzltqJaao3w==-0189fd5c644b7b169bd838d6a36fb776] [checkout] : Function completed successfully. +[restate] [2023-08-16T08:01:08.983Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Matched and replayed message from journal ; SleepEntryMessage +[restate] [2023-08-16T08:01:08.984Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-16T08:01:08.984Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Function completed successfully. ... logs of `UserSessionService/Checkout` ... ``` @@ -1083,18 +1083,18 @@ You should see logs similar to: ```logs // ... UserSessionService/Checkout logs ... -[restate] [2023-08-16T08:08:45.987Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Invoking function. -[restate] [2023-08-16T08:08:45.987Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:08:45.987Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:08:45.988Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:08:45.987Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Invoking function. +[restate] [2023-08-16T08:08:45.987Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:08:45.987Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:08:45.988Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-next-line Payment call succeeded for idempotency key 923d1558-bf17-4c94-b027-4cfd778049fe and amount 40 -[restate] [2023-08-16T08:08:45.988Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-16T08:08:45.988Z] DEBUG: [.Checkout-AYn9Y9aheymN6Ter0Y0Otw==-0189fd63d6a175a6a84606673ebc7fa2] [checkout] : Function completed successfully. -[restate] [2023-08-16T08:08:45.989Z] DEBUG: [.UserSession-AzEyMw==-0189fd63d69e72298e3ed46778b22a3e] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage -[restate] [2023-08-16T08:08:45.989Z] DEBUG: [.UserSession-AzEyMw==-0189fd63d69e72298e3ed46778b22a3e] [checkout] : Adding message to journal and sending to Restate ; ClearStateEntryMessage -[restate] [2023-08-16T08:08:45.989Z] DEBUG: [.UserSession-AzEyMw==-0189fd63d69e72298e3ed46778b22a3e] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-16T08:08:45.989Z] DEBUG: [.UserSession-AzEyMw==-0189fd63d69e72298e3ed46778b22a3e] [checkout] : Function completed successfully. +[restate] [2023-08-16T08:08:45.988Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-16T08:08:45.988Z] DEBUG: [Checkout/checkout] [f7_cNhBPYp4BiiHV5Zxwno4-FrEGNoOL] : Function completed successfully. +[restate] [2023-08-16T08:08:45.989Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:08:45.989Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Adding message to journal and sending to Restate ; ClearStateEntryMessage +[restate] [2023-08-16T08:08:45.989Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-16T08:08:45.989Z] DEBUG: [UserSession/checkout] [K1qex52CPYkBiiHV5Zl7vY2Gie86MAZl] : Function completed successfully. // ... UserSessionService/Checkout logs ... ``` @@ -1223,15 +1223,15 @@ Have a look at the logs to see the retries.
Show the logs ```log -[restate] [2023-08-16T08:24:28.507Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Invoking function. -[restate] [2023-08-16T08:24:28.507Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:24:28.507Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.508Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.507Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Invoking function. +[restate] [2023-08-16T08:24:28.507Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:24:28.507Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.508Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-next-line Payment call failed for idempotency key adab6b35-0536-4348-8912-35f8cd474cf8 and amount 40. Retrying... -[restate] [2023-08-16T08:24:28.508Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:24:28.508Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.509Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.508Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:24:28.508Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.509Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-start [restate] [2023-08-16T08:24:28.509Z] DEBUG: Error while executing side effect 'side-effect': Error - Payment call failed [restate] [2023-08-16T08:24:28.519Z] DEBUG: Error: Payment call failed @@ -1246,15 +1246,15 @@ Payment call failed for idempotency key adab6b35-0536-4348-8912-35f8cd474cf8 and at processTicksAndRejections (node:internal/process/task_queues:95:5) at dispatchUnkeyedRpcHandler (/Users/till/restate/git/tour-of-restate-typescript/node_modules/@restatedev/restate-sdk/src/server/base_restate_server.ts:366:18) [restate] [2023-08-16T08:24:28.520Z] DEBUG: Retrying in 10 ms -[restate] [2023-08-16T08:24:28.520Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; SleepEntryMessage +[restate] [2023-08-16T08:24:28.520Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; SleepEntryMessage // highlight-end -[restate] [2023-08-16T08:24:28.520Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.532Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.520Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.532Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-next-line Payment call failed for idempotency key adab6b35-0536-4348-8912-35f8cd474cf8 and amount 40. Retrying... -[restate] [2023-08-16T08:24:28.532Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:24:28.532Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.532Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.532Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:24:28.532Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.532Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-start [restate] [2023-08-16T08:24:28.532Z] DEBUG: Error while executing side effect 'side-effect': Error - Payment call failed [restate] [2023-08-16T08:24:28.534Z] DEBUG: Error: Payment call failed @@ -1268,22 +1268,22 @@ Payment call failed for idempotency key adab6b35-0536-4348-8912-35f8cd474cf8 and at dispatchUnkeyedRpcHandler (/Users/till/restate/git/tour-of-restate-typescript/node_modules/@restatedev/restate-sdk/src/server/base_restate_server.ts:366:18) at HostedGrpcServiceMethod.invoke (/Users/till/restate/git/tour-of-restate-typescript/node_modules/@restatedev/restate-sdk/src/types/grpc.ts:49:23) [restate] [2023-08-16T08:24:28.534Z] DEBUG: Retrying in 20 ms -[restate] [2023-08-16T08:24:28.534Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; SleepEntryMessage +[restate] [2023-08-16T08:24:28.534Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; SleepEntryMessage // highlight-end -[restate] [2023-08-16T08:24:28.534Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.556Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.534Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.556Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage // highlight-next-line Payment call succeeded for idempotency key adab6b35-0536-4348-8912-35f8cd474cf8 and amount 40 -[restate] [2023-08-16T08:24:28.557Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:24:28.557Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.557Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.557Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:24:28.557Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.557Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage Payment successful. Notifying user about shipment. Notifying user 123 of payment success -[restate] [2023-08-16T08:24:28.557Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Adding message to journal and sending to Restate ; undefined -[restate] [2023-08-16T08:24:28.557Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Scheduling suspension in 30000 ms -[restate] [2023-08-16T08:24:28.558Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Received completion message from Restate, adding to journal. ; CompletionMessage -[restate] [2023-08-16T08:24:28.558Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Journaled and sent output message ; OutputStreamEntryMessage -[restate] [2023-08-16T08:24:28.558Z] DEBUG: [.Checkout-AYn9cjhZeoalzvUlSI/rUA==-0189fd7238597682975666f3eb0833cb] [checkout] : Function completed successfully. +[restate] [2023-08-16T08:24:28.557Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Adding message to journal and sending to Restate ; undefined +[restate] [2023-08-16T08:24:28.557Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Scheduling suspension in 30000 ms +[restate] [2023-08-16T08:24:28.558Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Received completion message from Restate, adding to journal. ; CompletionMessage +[restate] [2023-08-16T08:24:28.558Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Journaled and sent output message ; OutputStreamEntryMessage +[restate] [2023-08-16T08:24:28.558Z] DEBUG: [Checkout/checkout] [bE19gwjrZxIBiiHKisNy5Jjvmc0fMHyk] : Function completed successfully. ```
@@ -1339,7 +1339,7 @@ If you expand one of the traces, you can see additional tags describing some met You can use Jaeger's search functionality to find specific traces. For example, to find the traces of a specific invocation, you can enter the Restate invocation ID, which you can find in the logs, into the search field `Tags`: ``` -restate.invocation.sid="UserSession-AzEyMw==-0189fd79737d7e4d8a2b16b7682323c5" +restate.invocation.id="T4pIkIJIGAsBiiGDV2dxK7PkkKnWyWHE" ``` ![Checkout call search](/img/jaeger_invocationid_search_handler.png) @@ -1347,7 +1347,7 @@ Or for example, to search all traces of `checkout` calls, you can select `invoke Note that one-way calls are shown as separate traces. The traces of the original call contain the one-way call, but the timing represents only the scheduling of the one-way call in the runtime. -To search for the traces of the execution of the one-way call, you can use the last numeric section of the invocation ID and enter it in the upper-right search box in the Jaeger UI. +To search for the traces of the execution of the one-way call, you can use the `restate.invocation.id`: ![Jaeger background call](/img/jaeger_tour_background_call_handler.png) diff --git a/static/img/jaeger-import-file.png b/static/img/jaeger-import-file.png index 5f2647c4..16215172 100644 Binary files a/static/img/jaeger-import-file.png and b/static/img/jaeger-import-file.png differ diff --git a/static/img/jaeger_checkout_traces_tour_handler.png b/static/img/jaeger_checkout_traces_tour_handler.png index e1798242..6462914f 100644 Binary files a/static/img/jaeger_checkout_traces_tour_handler.png and b/static/img/jaeger_checkout_traces_tour_handler.png differ diff --git a/static/img/jaeger_docs_invocationid_search.png b/static/img/jaeger_docs_invocationid_search.png deleted file mode 100644 index c2ce6c77..00000000 Binary files a/static/img/jaeger_docs_invocationid_search.png and /dev/null differ diff --git a/static/img/jaeger_invocationid_search_handler.png b/static/img/jaeger_invocationid_search_handler.png index d458f539..0d267456 100644 Binary files a/static/img/jaeger_invocationid_search_handler.png and b/static/img/jaeger_invocationid_search_handler.png differ diff --git a/static/img/jaeger_tour_background_call_handler.png b/static/img/jaeger_tour_background_call_handler.png index a3efe3f8..a5a0ea91 100644 Binary files a/static/img/jaeger_tour_background_call_handler.png and b/static/img/jaeger_tour_background_call_handler.png differ diff --git a/static/img/jaeger_traces_tour_handler.png b/static/img/jaeger_traces_tour_handler.png index 2f832de6..910d5dac 100644 Binary files a/static/img/jaeger_traces_tour_handler.png and b/static/img/jaeger_traces_tour_handler.png differ diff --git a/static/img/understanding_traces.png b/static/img/understanding_traces.png deleted file mode 100644 index a8df6a0b..00000000 Binary files a/static/img/understanding_traces.png and /dev/null differ