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

fix(server): better tracing management #543

Merged
merged 4 commits into from
Nov 3, 2024

Conversation

robertohuertasm
Copy link
Member

@robertohuertasm robertohuertasm commented Oct 31, 2024

What problem are you trying to solve?

There were different threads using process::exit. This was making it difficult to correctly flush the tracing messages.

On top of that, the WorkerGuard was shared but this was introducing other issues, as multiple references would avoid flushing the traces.

In conclusion, the mixture of these two facts was making the tracing messages not being correctly flushed

What is your solution?

Centralized all the panics into the main thread so we can guarantee that the tracing messages are properly flushed by dropping the WorkerGuard if needed.

Alternatives considered

What the reviewer should know

There's only one panic left in the keep alive thread. This is a last resource mechanism, and it's only being used after having tried 2 different alternatives before.

While at the task I added errors 100, 102 and 103 so we can have more useful information if we find those codes in the IDE and handle those cases accordingly.

IDE-3768

@robertohuertasm robertohuertasm requested a review from a team as a code owner October 31, 2024 12:47
@robertohuertasm robertohuertasm force-pushed the rob/fix/log-to-files-IDE-3768 branch from 68ef20a to 731c95b Compare October 31, 2024 14:35
@robertohuertasm robertohuertasm merged commit 49225dc into main Nov 3, 2024
70 checks passed
@robertohuertasm robertohuertasm deleted the rob/fix/log-to-files-IDE-3768 branch November 3, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants