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

Move the writing of the PerformanceLog into a middleware #1481

Closed
bschmalhofer opened this issue Dec 5, 2021 · 6 comments
Closed

Move the writing of the PerformanceLog into a middleware #1481

bschmalhofer opened this issue Dec 5, 2021 · 6 comments
Assignees
Labels
tidying Tidying of the code
Milestone

Comments

@bschmalhofer
Copy link
Contributor

Things like access logs seem to make more sense as a middleware than as integrated into the interface modules. The changed behaviour would be that the Login-Requests and the failed PreApplication modules would be logged too, But IMHO this is more a feature than a bug.

@bschmalhofer bschmalhofer added the tidying Tidying of the code label Dec 5, 2021
@bschmalhofer bschmalhofer added this to the OTOBO 10.1.1 milestone Dec 5, 2021
@bschmalhofer bschmalhofer self-assigned this Dec 5, 2021
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.1.1, Wishlist Dec 6, 2021
@bschmalhofer
Copy link
Contributor Author

Moved this to Wishlist, as the current performance log depends on having logging set up and that the user data is available. IMHO both of these are not really needed for a performance log.

@bschmalhofer
Copy link
Contributor Author

Checked again whether the user information is used anywhere in the AdminPerformanceLog frontend module. Thus I propose to remove that information from the performance logfile and to move the performance log functionality into a middle ware.

@bschmalhofer
Copy link
Contributor Author

While looking into this I noticed that the detailed view of the performance log is off.

Bildschirmfoto vom 2021-12-11 14-00-07

This is from a fresh installation that is only some minutes old. The data seems to be correctly aggregated by 1 minute but the date in the very left column varies by hour. Looks like a factor of 60 was incorrectly applied somewhere along the line.

@bschmalhofer
Copy link
Contributor Author

While looking into this I noticed that the time to create a response is measured by seconds. I see no reason for not measuring by milliseconds. Maybe once upon a time there were problems with Time::HiRes when running under windows.

I consider this as a bug.

@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Dec 12, 2021

While we are at it:

  • rotate the file with File::Write::Rotate, or File::RoundRobin, or RRDtool files
  • use Time::HiRes::tv_interval()for taking the time

@svenoe
Copy link
Contributor

svenoe commented Feb 10, 2023

Can be looked at, if there are any new requests concerning logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tidying Tidying of the code
Projects
None yet
Development

No branches or pull requests

2 participants