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

[💡 FEATURE REQUEST]: Log elapsed time always in microseconds #1858

Assignees
Labels
C-feature-request Category: feature requested, but need to be discussed
Milestone

Comments

@dmitryuk
Copy link

dmitryuk commented Feb 2, 2024

Plugin

Logger

I have an idea!

RR example log line

2024-02-02T02:51:48+0000	INFO	http        	http log	{"status": 200, "method": "GET", "URI": "/api/v2/cart/status?args=site24x7", "remote_address": "10.56.36.63:42084", "read_bytes": 0, "write_bytes": 448, "start": "2024-02-02T02:51:48+0000", "elapsed": "18.868363ms"} 

It is hard to monitor elapsed parameter, because it has units (microseconds or seconds).

Is it possible to always write microseconds without unit ?

@dmitryuk dmitryuk added the C-feature-request Category: feature requested, but need to be discussed label Feb 2, 2024
@rustatian
Copy link
Member

Hey @dmitryuk 👋
Why is it hard to monitor?

@dmitryuk
Copy link
Author

dmitryuk commented Feb 3, 2024

Because elapsed can have different units (ms, s, m). Logging system like ELK hard to interpreter it

@dmitryuk
Copy link
Author

dmitryuk commented Feb 5, 2024

@rustatian If I make a PR to always cast elapsed timestamp to ms units will you accept it?

@rustatian
Copy link
Member

@dmitryuk No need to cast, time might be written in ms natively. Sure, you may send a PR, but this elapsed time should be updated across the whole plugin.

@rustatian
Copy link
Member

Cool, thanks @dmitryuk 👍

@rustatian
Copy link
Member

@dmitryuk Please, rebase your PR's with master. There were some tests are failed, I've fixed that.

@rustatian rustatian modified the milestones: v2023.3.11, v2024.1.0 Feb 15, 2024
@dmitryuk
Copy link
Author

@rustatian done, thanks

@rustatian
Copy link
Member

Thanks @dmitryuk 👍
All PRs are merged 😃

@rustatian rustatian mentioned this issue Feb 29, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment