Troubleshooting app crashes in Connect - How to access app's Connect session Id

Hi!

I am facing an issue of troubleshooting app crashes. When the users raise a ticket saying that their app crashed, I need to investigate the logs to see what exactly happened. But, I am unable to figure out which of these Connect 'sessions' (if that's the right word) crashed:
image

I can see that each of those Connect sessions have a unique Id which I could get the user raising the ticket to quote, but I can't find a way to read that Connect session id into the app.

I have 2 questions:

  1. Is there a way to read the Connect session ids?
  2. What is the best/right way to troubleshoot app crashes and get to the logs for a specific User's specific Connect session id (note that I have logging of the server$session of the app with the Connect User to a database but this doesn't help me figure out which Connect session's log to look at).

Thanks

You'll want to check out the jobs API:
https://docs.posit.co/connect/api/#get-/v1/content/-guid-/jobs

There are also endpoints you can use to download the job logs or watch them in real time.