Skip to content

Commit

Permalink
Update tracing in Tour of Restate
Browse files Browse the repository at this point in the history
  • Loading branch information
gvdongen committed Aug 2, 2023
1 parent cc61fef commit 25dd9e0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions docs/tour-of-restate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1295,12 +1295,37 @@ docker run --name restate_dev --rm -d -e RESTATE_OBSERVABILITY__TRACING__ENDPOIN
Go to the Jaeger UI at http://localhost:16686.
Send requests to the runtime by adding tickets and checking out.
You should see traces similar to:
![Jaeger trace](/img/trace.png)
In the Jaeger UI, select the `UserSessionService` from the service dropdown.
You should see the `AddTicket` and `Checkout` requests listed:
Note that one-way calls are shown as separate traces. So here, we only see the `UserSessionService/Checkout` and `CheckoutService/Checkout` calls,
and not the async call to `TicketService/MarkAsSold`.
![Jaeger traces tour](/img/jaeger_traces_tour.png)
Have a look at the traces of the `Checkout` call:
![Checkout call traces](/img/jaeger_checkout_traces_tour.png)
You can see the calls that were done to Restate (e.g. invoke, sleep, one way call, get state, ...) and their timings.
If you expand one of the traces, you can see additional tags describing some metadata of the context call (e.g. invocation id, call arguments).
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="example.UserSessionService-AzEyMw==-0189b536906b746c8da6f83f0257acda"
```
Or to find all traces of `Checkout` calls, you can enter into the search field `Tags`:
```
rpc.method="Checkout"
```
![Checkout call search](/img/jaeger_checkout_search.png)
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.
![Jaeger background call](/img/jaeger_tour_background_call.png)
For more information, have a look at the [tracing docs](/restate/tracing).
Expand All @@ -1311,7 +1336,7 @@ You reached the end of this tutorial!
:::
Let's recap what we covered:
- reliable, suspendable reqeust-response calls
- reliable, suspendable request-response calls
- one-way calls without the need for queues
- suspensions for external communication
- durable timers for sleep or for calling other services
Expand Down
Binary file added static/img/jaeger_checkout_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/jaeger_checkout_traces_tour.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/jaeger_tour_background_call.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/jaeger_traces_tour.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed static/img/trace.png
Binary file not shown.

0 comments on commit 25dd9e0

Please sign in to comment.