logoalt Hacker News

fuzzy2today at 7:09 AM2 repliesview on HN

I just don’t get this sentiment. How would you represent metrics as traces? You cannot. Even reconstructing traces from logs would be challenging at best. How would you get, say, Garbage Collector metrics from logs or traces? You cannot.

There is no magic bullet. Observability isn’t something you can just slap on and call it a day. While traces and logs might share superficial similarities, they are not the same. And metrics are something else altogether. Trying to somehow unify them would be a prime example of "wrong abstraction".

> “The next time something like this occurs again, please save me a trace.”

The building blocks for this exist. The observability platform must simply (haha) implement the pattern detectors and use them for sampling decisions.


Replies

anygivnthursdaytoday at 7:27 AM

I am not sure if this is what they mean, but e.g. with Micrometer in Java you can instrument your code once with observations that produces observation events, then you can register handlers that can turn them into metrics, or logs, or traces without having to instrument your code three times.

https://docs.micrometer.io/micrometer/reference/observation....

show 1 reply
sweetgiornitoday at 8:06 AM

> How would you represent metrics as traces?

Just instrument your meter implementation so each observation produces a span. Boom, free metric-derived traces.

show 2 replies