deephaven / deephaven-core

Deephaven Community Core
Other
254 stars 80 forks source link

Add more structured data into LogBufferRecord #89

Open devinrsmith opened 3 years ago

devinrsmith commented 3 years ago

Right now, LogBufferRecord has a timestamp, level, and message. When sourced from an appropriate logging framework, there may be more information available. For example, logback ILoggingEvent has thread name and logger name. Adding these types of fields to LogBufferRecord may provide a better structured UX for LogBuffer subscribers.

jcferretti commented 1 year ago

Of note as an implication from the description: LogBufferAppender loses the Throwable argument for statements like log.warn("This exception happened:", someThrowableObject).

eg, https://illumon.slack.com/archives/C03FCFM2KRQ/p1673495893856449

devinrsmith commented 1 year ago

I might have misled @jcferretti a bit, because it does look like the throwable gets encoded in the LogBufferApppender; just not as its own entity.

I believe the throwable gets captured into the LogBufferRecord#data field via ch.qos.logback.core.encoder.Encoder#encode, https://logback.qos.ch/manual/layouts.html#ex

nbauernfeind commented 11 months ago

I was chatting with Colin today and I realized we could easily capture the Query EvaluationNumber and OperationNumber outside of the update graph. With a little orchestration, I suspect we can also capture then and the performance entry id during update graph processing.

This is potentially really useful information to tack on to the structured log output.