agardnerIT / tracepusher

Generate and push OpenTelemetry Trace data to an OTEL collector in JSON format
Apache License 2.0
52 stars 11 forks source link

Log to trace utility #91

Open agardnerIT opened 3 months ago

agardnerIT commented 3 months ago

It is very common in legacy environments (ie. those not using traces) for correlation IDs to be added to log line entries.

(Human) operators can then search their logging software to identify "something" across tiers or logs.

It works, but the visualisation is highly dependent on the available visualisations provided by the logging software and thus either difficult, non-standard or hard to do.

Take these log lines for example:

2024-05-10 07:00:00 INFO Wake Up corr_id=abc123499
2024-05-10 08:00:00 INFO Breakfast corr_id=abc123499
2024-05-10 08:30:00 INFO Drive to Work corr_id=abc123499
2024-05-10 09:00:00 INFO Work corr_id=abc123499
2024-05-10 17:00:00 INFO Drive Home corr_id=abc123499
2024-05-10 18:00 INFO At Home corr_id=abc123499
2024-05-10 22:00:00 INFO Sleep corr_id=abc123499

As humans, we can readily understand that this:

  1. Describes a unique individual's day (abc123499)
  2. That this individual did 5 activities (Wake up, had breakfast, Drove to work, Worked, Drove home and Slept)

But wouldn't this be more logical visualised like this?

Screenshot 2024-05-22 at 7 31 41 PM

Task

Assumptions

Design Decisions

agardnerIT commented 2 months ago

First version of this: Tracking GitHub codespace creation using tracepusher (sample code)