roadrunner
roadrunner copied to clipboard
[💡 FEATURE REQUEST]: Log elapsed time always in microseconds
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 ?
Hey @dmitryuk 👋 Why is it hard to monitor?
Because elapsed can have different units (ms, s, m). Logging system like ELK hard to interpreter it
@rustatian If I make a PR to always cast elapsed timestamp to ms units will you accept it?
@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.
MR 1 https://github.com/roadrunner-server/http/pull/199 MR 2 https://github.com/roadrunner-server/jobs/pull/125 MR 3 https://github.com/roadrunner-server/grpc/pull/132 MR 4 https://github.com/roadrunner-server/kafka/pull/339 MR 5 https://github.com/roadrunner-server/amqp/pull/121 MR 6 https://github.com/roadrunner-server/nats/pull/118 MR 7 https://github.com/roadrunner-server/boltdb/pull/109 MR 8 https://github.com/roadrunner-server/beanstalk/pull/103 MR 9 https://github.com/roadrunner-server/sqs/pull/398
Ready for review
Cool, thanks @dmitryuk 👍
@dmitryuk Please, rebase your PR's with master. There were some tests are failed, I've fixed that.
@rustatian done, thanks
Thanks @dmitryuk 👍 All PRs are merged 😃