Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
756 stars 55 forks source link

Use glogger as remote logging infra #628

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

Description

Closes: https://github.com/Granulate/gprofiler/issues/525

I didn't support this feature in A/B mode as suggested in the ticket, it's much changes than I expected and it'll be hard to maintain both infras in the code.

Some changes I did as part of it:

TODOs:

How Has This Been Tested?

d3dave commented 1 year ago

reviewed all. just that one comment.

Jongy commented 1 year ago

Waiting on https://github.com/Granulate/gprofiler/pull/621 so CI is fixed.

Jongy commented 1 year ago

I need to fix the tests (some tests referenced the extras via the old way)

Jongy commented 1 year ago

@d3dave - about this note:

Call the handler.close() method of glogger - is it needed to ensure all logs are sent back? Or does glogger have some kind of finalization?

How does glogger handle it? It seems that messages are sent by some mechanism, before the process goes down.

d3dave commented 1 year ago

How does glogger handle it? It seems that messages are sent by some mechanism, before the process goes down.

logging registers an atexit handler that closes all stray handlers. You only need to do it if you need to flush before process exit.

Jongy commented 1 year ago

Made one final change - ready to merge now