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

Improved log interface performance and streaming #157

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

samuchila
Copy link
Contributor

@samuchila samuchila commented Jan 15, 2024

This commit enhances the log interface by reducing lag and improving the rendering speed. It introduces a feature to load the latest logs first and logs are now streamed in real-time from backend, ensuring immediate access to new logs. The infrastructure is now able to handle both streaming and one time log transfer in one function only, avoiding the use of multiple implementations. The routes ensure the output is served to the client based on content negotiation.

Fixes #25

@samuchila
Copy link
Contributor Author

@schrieveslaach Please review the changes.

Copy link
Contributor

@schrieveslaach schrieveslaach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this issue. I think it is a good start but in the details I want to iron out somethings:

  • tail_lines seems to mixed up a little
  • It seems to me that we don't need two implementations under the hood

Let's have a chat to figure out these things.

api/Cargo.toml Outdated Show resolved Hide resolved
api/src/infrastructure/mod.rs Outdated Show resolved Hide resolved
api/src/infrastructure/docker.rs Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/infrastructure/docker.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@schrieveslaach schrieveslaach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecture has been improved significantly. Love it.

There are some minor details (see comment). Also, the frontend could be simplified when downloading logs.

api/src/apps/mod.rs Outdated Show resolved Hide resolved
api/src/apps/mod.rs Outdated Show resolved Hide resolved
api/src/apps/mod.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/infrastructure/kubernetes/infrastructure.rs Outdated Show resolved Hide resolved
api/src/infrastructure/kubernetes/infrastructure.rs Outdated Show resolved Hide resolved
frontend/src/LogsDialog.vue Outdated Show resolved Hide resolved
frontend/src/LogsDialog.vue Outdated Show resolved Hide resolved
frontend/src/LogsDialog.vue Outdated Show resolved Hide resolved
Copy link
Contributor

@schrieveslaach schrieveslaach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work and I think there are just some minor things left. Please, checkout my comments.

api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/mod.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
api/src/apps/routes.rs Outdated Show resolved Hide resolved
frontend/src/LogsDialog.vue Outdated Show resolved Hide resolved
frontend/src/LogsDialog.vue Outdated Show resolved Hide resolved
This commit enhances the log interface by reducing lag and improving the
rendering speed. It introduces a feature to load the logs for the past day
first and logs are now streamed in real-time from backend, ensuring
immediate access to new logs. Additionally, a download button that
downloads all logs since container was started is now made available
at the top of the logs dialog.
Copy link
Contributor

@schrieveslaach schrieveslaach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very, very nice.

@schrieveslaach schrieveslaach merged commit 6bd89b6 into aixigo:master Feb 14, 2024
2 checks passed
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.

Improve Log View/Parsing Performance
2 participants