TGViewer
CatOps CatOps @catops · 5.07K subscribers
Post #2022 3K
​​Logging is one of the three pillars of observability. One of the Palantir Blog posts outlines some pretty nice ideas that may help you to build a better observability solution.

Structured logging. Of course, all of us know that logs are easier to analyze if they are structured in commonly across applications. Palantir improved the way "message" field usually looks like:


{
 "message": "Processing event from user",
"params": {
"event": "foo",
"user": "bar"
},
"level": "DEBUG",
"logger": "com.logger.name",
"time": "2019-07-28T09:31:04.46165-07:00"
}


No
te that these structured logs avoid a common logging practice of inserting parameters into the log message via string formatting, creating a variable message ("Processing event foo from user bar"). Such an approach will prevent you from building complex log queries to filter out variable messages. Instead, you can search for an exact match and add additional filters by other fields (e.g. params.user == "bar")

L
ogs from 3rd party services. Usually, logs from 3rd-party components do not fit your unified logging structure. To overcome this, Palantir engineers built tooling that analyzes Golang source code and creates regular expressions which convert original messages to the ones with an expected structure.

You can read more about it in the blog post itself. I hope these ideas will help you to build a better observability system!

P.S. Thanks Valerii Tatarin for this post. If you'd like to share something with community too, feel free rich @MaxymVlasov or @grem1in.

#logging #observability
  • 👍 10
More from @catops
  1. Oct 16, 2026Are you sure that it is a vacation, and not just location/activity change? Why I still see…
  2. Oct 16, 2026While I’m still enjoying my vacation, this CVE is too interesting to pass by. PwnEscape: G…
  3. Oct 8, 2026I’m going on a vacation, which means that I likely won’t post at all or post something ver…
  4. Oct 6, 2026A colleague of mine wrote an article about data migrations. Handling data migrations witho…
  5. Oct 1, 2026​​I traded my personal information for this report, so you don’t have to! DataDog presents…
  6. Sep 29, 2026A Cybersecurity books bundle by O’Reilly on Humble Bundle. The bundle is fresh and is stil…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →