observability

o11y, monitoring, logging, tracing, alerting and higher level discussions
greglook 2021-06-08T18:04:52.001500Z

Hi everyone! I’m excited to announce general availability of Amperity’s observability library `ken` and its companion, `ken-honeycomb` . We’ve been using this code in an internal library for a few months now and it has dramatically improved our insight into how our systems operate. I’ve recently open-sourced the code and it’s ready for use! https://github.com/amperity/ken

👀 4
2021-06-09T09:04:46.003Z

ken looks awesome! I really like the API and the docs. Thanks for sharing 🙂 I was looking at https://github.com/conormcd/clj-honeycomb and https://github.com/tendant/clj-telemetry. But having a generic solution with ken is much nicer! Building an integration with OpenTelemetry wouldn't be too much effort either if someone likes to use that as backend. Looking forward to giving ken a try for some project soon!

greglook 2021-06-09T16:10:41.003300Z

Awesome - yeah, we wanted something decoupled from specific sinks, because we also pipe ken events other places, for example our structured JSON logs. Plus, when doing local development it’s super useful to subscribe a pretty-printer and get a dump into your console, or a simple local file appender for later investigation.

nivekuil 2021-06-09T16:15:55.003500Z

have you seen mulog? looks similar to ken at a glance

greglook 2021-06-09T16:27:00.003700Z

Yeah, it was announced a bit after we’d built and started using ken internally - definitely a lot of similar ideas

James Carr 2021-06-09T20:23:26.004Z

Really cool. Like @hi895 mentioned, otel integration would be 👑

h0bbit 2021-06-10T04:28:51.008Z

@greg316: I’ve spent some time on and off in the last few months looking at mulog by @bruno.bonacci. Starting July, I’m going to spend focussed time on instrumenting our code to emit events and moving away from file based logging. Based on my reading so far, my plan is to test with Open Telemetry compliant instrumentation libraries and use a Open Telemetry collector as a side-car. Some questions: 1. Is this how you are using ken internally as well? (seeing as honeycomb is an open-telemetry compliant sink) 2. Have you done a comparison of ken and mulog? (Sorry for the lazy question, but it would be so convenient 😛 to get the comparison from the library authors themselves 🙂 than to do the work). On a cursory glance, the two projects look similar. What should be the criteria for choosing between them, in your opinion?

greglook 2021-06-10T05:34:40.008500Z

1. https://github.com/amperity/ken-honeycomb currently uses libhoney-java (the Honeycomb SDK) to send events. I don’t think it’s a generic OT option, unfortunately. I took a quick look at io.opentelemetry/opentelemetry-api and it’s not immediately obvious how to send spans directly, but maybe there’s a lower-level interface available.

greglook 2021-06-10T05:43:23.008800Z

I haven’t used mulog directly, but I took a quick look through the code. • It seems to have a good number of integrations for various destinations already, so if you’re looking for something that integrates with your system out-of-the-box, that might be a better bet for you. • The high-level apis are pretty similar - u/log is like ken/observe, u/trace is similar to ken/watch. I don’t see direct equivalents for the annotations in ken, so if you want to enrich events during processing, ken might be more suited. • It looks like the context collectors in ken are a bit more flexible - ulog has a global context and a local context, whereas you can use arbitrary functions in ken. • A lot of our code at Amperity is written with async constructs (using Manifold) so it was important that the observability library be natively compatible with that. It doesn’t look like ulog has async support, or if it does I haven’t found it.

h0bbit 2021-06-10T07:18:41.009Z

Thank you, I’ll look into how ken works with async code (as well as mulog) . I haven’t experimented with instrumenting async code yet, but we have some code paths which are async and we may have more in the future.

2021-06-10T13:12:21.009200Z

Hi, μ/log objective is to capture tracking information from applications and safely dispatch the data to third-party applictions. It can be connected to any backend (form ELS, Kafka, Prometeus, Zipking, Jaeger, Cloudwatch and https://cljdoc.org/d/com.brunobonacci/mulog/0.7.1/doc/publishers). It has only one dependency (ring-buffer) and it is extremely fast (~300 nanosecond). It doesn't prescribe a format or a specific tool/backend, but is a general purpose library to capture and dispatch quantitative/qualitative measures to other tools. If what you looking for is the data for further processing/search, then μ/log is the tool for you. I've a ton of tooling built on top of μ/log (some of which I might opensource at some point). The point is that with closed-system libraries you get the pretty graph, and that's all, with μ/log you can get raw data which you can use to get the pretty graphs but also to create custom built alerting, automation/auto-scaling based on specific conditions, you can use the info for qualitative measure, and store/keep the data in deep storage like S3 (very cheap) and query with Athena. Saas tools become very expensive when the amount of data increases. With μ/log you can customise your sampling policy to tailor your needs and keep use the datastore that you already use and know to query the data.

seancorfield 2021-06-08T18:51:17.001800Z

This looked very cool at the recent online meetup where it was presented!

ghadi 2021-06-08T21:27:36.002100Z

was that meetup recorded?

seancorfield 2021-06-08T21:41:22.002300Z

I think it was. I looked on Amperity’s YT channel and they used to post Seajure recordings so maybe it’ll turn up there? @greg316

greglook 2021-06-08T21:49:34.002500Z

It was recorded, I’ll ping about getting it uploaded

1