Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement request IDs to trace errors #1072

Closed
fengelniederhammer opened this issue Feb 22, 2024 · 4 comments · Fixed by #3005
Closed

Implement request IDs to trace errors #1072

fengelniederhammer opened this issue Feb 22, 2024 · 4 comments · Fixed by #3005
Labels
backend related to the loculus backend component discussion Open questions website Tasks related to the web application
Milestone

Comments

@fengelniederhammer
Copy link
Contributor

We should implement something that makes tracing requests in log files easier. When there are many concurrent requests, it's impossible to see which message belongs to which request.

I propose to implement request ids similar to what we did in LAPIS: GenSpectrum/LAPIS#586. This should be done in the website server and in the backend. Whenever there is already a request id, it should be passed on to the next service when issuing a call (e.g. when the website server calls LAPIS).

@fengelniederhammer fengelniederhammer added website Tasks related to the web application backend related to the loculus backend component RFC labels Feb 22, 2024
@corneliusroemer
Copy link
Contributor

This should also be passed to the preprocessing pipeline, which can then return the id back to the backend

@fengelniederhammer
Copy link
Contributor Author

The lifetime of such a request ID should be one request (and not longer). We want to be able to trace single request by filtering logs by the ID. I think we should not pass it into the preprocessing pipeline, but of course we can think of another way to identify backend calls issued by one preprocessing run (e.g. by logging the request ids that were returned to the pipeline when pulling the data and submitting the results).

@corneliusroemer
Copy link
Contributor

Right, I misunderstood the scope of this.

Would it still be useful to somehow have an id associated with each iteration of the preprocessing loop. It should originate from the preprocessing pipeline? It generates a UUID, attaches that to the /get-unprocessed-sequences request, but also attaches it later to the /submit-processed-sequences? And the backend logs those UUIDs so we can correlate what happened?

@fengelniederhammer
Copy link
Contributor Author

I think we don't need that here, since the preprocessing pipeline doesn't do anything in parallel (or does it?). So the logs of one run are in order anyway. The backend would then return a request id on every call, which can be written to the preprocessing log. IMO that's good enough and requires minimal effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend related to the loculus backend component discussion Open questions website Tasks related to the web application
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants