Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
wsargent
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
wsargent
4y ago
> I'm surprised this is up for debate. I looked into logging in protobuf when I was seeing if there was a better binary encoding for ring-buffer logging, along the same lines as nanolog: https://tersesystems.com/blog
2.
▲
by
wsargent
4y ago
Same! https://github.com/tersesystems/blacklite/
3.
▲
by
wsargent
4y ago
I see it the other way around: tracing is essentially logging with hierarchy. If you can keep the context of a "parent" span around, then you can log all of the entries out and build up the entire trace from spans, although you c
4.
▲
by
wsargent
4y ago
MDC/NDC only reliably works when you don't have asynchronous code (Akka/Vert.x/CompletionStage) through your application. As soon as you start using multiple threads, it becomes significantly more complex to keep MDC co
5.
▲
Show HN: Dynamic Debug Logging
1 points
by
wsargent
4y ago
|
0 comments
6.
▲
by
wsargent
5y ago
Here are the benchmarks [1] using a no-op appender. There are some micro-optimizations I can make, but I think this is a pretty good start. https://github.com/tersesystems/echopraxia/blob/main/BENCHMA...
7.
▲
by
wsargent
5y ago
I'll add that. I do have the benchmarking from Blindsight, the Scala logging API, and it's on the order of nanoseconds: https://tersesystems.github.io/blindsight/performance/benchm...
8.
▲
Show HN: Echopraxia, a better Java Logging API
10 points
by
wsargent
5y ago
|
4 comments
9.
▲
by
wsargent
5y ago
I thought we would have different debugging tools. Specifically, I thought languages would be designed around debugging use cases. The fact that we are still using debuggers and loggers and printlns to debug blows my mind.
10.
▲
by
wsargent
6y ago
This is neat! I have a tool blacklite[1] that logs to sqlite, so using this I can export those logs automatically to S3 and keep persistent logs even if the instance goes away. I can see this being really useful for k8s and docker contain
11.
▲
Queryable Logging with Blacklite
(tersesystems.com)
1 points
by
wsargent
6y ago
|
1 comments
12.
▲
by
wsargent
6y ago
I've published a logging appender called Blacklite that writes logging events to SQLite databases. It has good throughput and low latency, and comes with archivers that can delete old entries, roll over databases, and compress log entr
13.
▲
by
wsargent
6y ago
How does this compare to Amazon Ion? https://amzn.github.io/ion-docs/
14.
▲
by
wsargent
6y ago
There's also Witchcraft Logging, which has the concept of "safe" parameters and is available in Go, Rust, and Clojure: https://docs.rs/witchcraft-log/0.3.0/witchcraft_log/
15.
▲
by
wsargent
6y ago
Also https://www.usenix.org/sites/default/files/conference/protec... and https://speakerdeck.com/kaushik/tracing-and-profiling-java-a...
16.
▲
by
wsargent
6y ago
Lots of people do exactly this: https://tersesystems.com/blog/2019/10/05/diagnostic-logging-...
17.
▲
by
wsargent
6y ago
Yup, I have a demo app showing dumping from ringbuffer to JDBC here: https://terse-logback-showcase.herokuapp.com/
18.
▲
by
wsargent
6y ago
I'd argue that you want to keep that debugging line, but put it inside a guard. Diagnostic logging is used lots in production [1]. [1] https://tersesystems.com/blog/2019/10/05/diagnostic-logging-...
19.
▲
by
wsargent
6y ago
You can also hook up your logging to a feature flag system, so it's only activated for a single user. [1] [1] https://tersesystems.com/blog/2019/07/22/targeted-diagnostic...
20.
▲
by
wsargent
6y ago
> Many Java logging systems allow you to enable/disable logging per package, but this is still not enough for a per function decision. I have something for that. [1] [1] https://tersesystems.github.io/blindsight/
21.
▲
by
wsargent
6y ago
> The second problem is to figure out if logging is affecting performance. Spoiler -- it totally can. Kirk Pepperdine talks about logging as a memory allocation bottleneck [1] So I gave my usual logging rant at a workshop that I gave. I
22.
▲
by
wsargent
6y ago
Agree with everything you've said, but MDC does have one big drawback: it's only convenient when you're working within a single thread. If you're writing asynchronous code (Scala, Akka, Vert.x etc) then MDC doesn't
23.
▲
by
wsargent
6y ago
Honeycomb has a free tier that is very generous: https://www.honeycomb.io/pricing ? You can set up with one of their Beelines, or just send JSON to the REST endpoint.
24.
▲
by
wsargent
6y ago
This is also known as an "event" in Honeycomb parlance. https://www.honeycomb.io/blog/how-are-structured-logs-differ...
25.
▲
by
wsargent
6y ago
He said a debug logging statement. You're logging at INFO level.
26.
▲
by
wsargent
6y ago
Off the top of my head: https://github.com/koenbollen/jl https://github.com/brocode/fblog https://github.com/gistia/json-log-viewer https://github.com/otros-s
27.
▲
by
wsargent
6y ago
This is what Honeycomb and Charity Majors talk about when they get into observability. They talk about events rather than logs, and discuss how to construct a meaningful event from a series of data points [1]. Having a good dictionary of l
28.
▲
by
wsargent
6y ago
https://tersesystems.com/blog/2019/07/28/triggering-diagnost...
29.
▲
by
wsargent
6y ago
Can confirm -- writing data to memory is incredibly fast. It's faster to use a lock-free queue and use CAS to insert data though: http://psy-lob-saw.blogspot.com/2016/12/linked-array-queues-... I've ben
30.
▲
by
wsargent
6y ago
I know this doesn't help for Python, but... You can do that in Java with instrumentation. Things like ByteBuddy [1] or ReactorDebugAgent [2] will add debugging statements into your code without you having to touch anything. If you wa
More ›