Have you considered applying observability but struggled to match the strategy with the tooling? Or maybe you were lost on how to do it? I had a great discussion with Hazel Weakly about Observability beyond Open Telemetry, keeping it "meaty" with practical thoughts. I learned a lot, and I'm sure you will, too! Just check the recording! Hazel is one of the best people in the observability space. I’ve been following her work for a long time. Don’t believe me? Check her works, e.g.: * Redefining Observability, * The 4 Evolutions of Your Observability Journey * OpenTelemetry Challenges: Handling Long-Running Spans * OpenTelemetry: Bridging Platform and Enablement * Monitoring Mastodons - A Story about Hachyderm Of course, Hazel is more than that and spends her days working on building out teams of humans as well as the infrastructure, systems, automation, and tooling to make life better for others. She’s worked at a variety of companies, across a wide range of tech, and knows that the hardest problems to solve are the social ones. Hazel currently serves as a Director on the board of the Haskell Foundation and is fondly known as the Infrastructure Witch of Hachyderm (a popular Mastodon instance). She also created the official Haskell “setup” Github Action and helps maintain it. She enjoys traveling to speak at conferences and sharing what she’s learned with others. I first saw her when I joined the Hachyderm Mastodon instance. She was the person trying to handle the sudden massive traffic spike of people transitioning from Twitter. Trying to keep Postgres and Ruby-based systems alive in the on-premise basement installation. Sounds familiar? Yet, it’s a similar story to our cases when we underprovision our systems, trying to recover unexpected traffic quickly. It’s hard without the system being observable. It was a nice starting point for our discussion, but we covered much more. We went through, e.g. * What’s even observability? * How do we define observability strategy? * How do we apply it in practice? * Hazel hints at how to set up observability in existing and new systems. * How to be reasonable and build observability from different tools, metrics, traces, and logs. * How to make organisation change and facilitate tech vs product discussions. * Event-Driven vs Observability. * And much more! It’s a bold statement, but I believe you’ll have difficulty finding more actionable guidance on this topic than Hazel gives in this recording. Warning: we went beyond Open Telemetry; if you never had contact with it, it’d be great if you checked other resources, e.g. Hazel articles or previous editions: * When Logs and metrics are not enough: Discovering Modern Observability * Making your system observability predictable * Gojko Adzic on designing product development experiments with Lizard Optimization * Why to measure and make our system observable? How to reason on chaotic world Nevertheless, I believe that the talk was accessible and also filled with a great piece of advice for all. That’s why we do not have a paywall here; we’d like you to benefit from it! Please leave the comments and share them with friends. We’d like to hear your thoughts! Cheers! Oskar p.s. Ukraine is still under brutal Russian invasion. A lot of Ukrainian people are hurt, without shelter and need help. You can help in various ways, for instance, directly helping refugees, spreading awareness, and putting pressure on your local government or companies. You can also support Ukraine by donating e.g. to Red Cross, Ukraine humanitarian organisation or donate Ambulances for Ukraine. Webinars: * #1 - From CRUD to Event Sourcing * #2 - Keep your streams short! Or how to model Event-Sourced systems efficiently * #3 - Implementing Distributed Processes * #4 - From CRUD to CQRS in practice * #5 - Architecture Weekly 100 Edition - Live Q&A * #6 - Alexey Zimarev - You don't need an Event Sourcing framework. Or do you? * #7 - Design and test Event-Driven projections and read models * #8 - Slim down your aggregates! * #9 - Radek Maziarka - Modularization with Event Storming Process Level * #10 - PostgreSQL Superpowers in Practice * #11 - Maciej "MJ" Jędrzejewski - Evolutionary Architecture: The What. The Why. The How. * #12 - Jeremy D. Miller: Simplify your architecture with Wolverine * #13 - Yves Goeleven - The Fantastic 9 * #14 - Mateusz Jendza: Why Verified Credentials is the Future of Digital Identity! * #15 - Mário Bittencourt: Leveraging BPMN for Seamless Team Collaboration in Software Development * #16 - Papers We Love #1 - Sagas (Hector Garcia-Molina, Kenneth Salem) * #17 - Simple patterns for events schema versioning * #18 - Andrea Magnorsky: Introducing Bytesize Architecture Sessions! * #19 - Laïla Bougriâ: Debug your thinking * #20 - Papers We Love #2 - How do committees invent? (Melvin E. Conway) * #21 - Michael Drogalis: Building the product on your own terms * #22 - On Performance Testing with Jarosław Pałka * #23 - Gojko Adzic on designing product development experiments with Lizard Optimization * #24 - Frontent Architecture, Backend Architecture or just Architecture? With Tomasz Ducin * #25 - Applying Observability: From Strategy to Practice with Hazel Weakly This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit www.architecture-weekly.com
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Welcome, all. And today, again, we have a special guest. This time, we have Hazel Weekly. And I'm really happy that Hazel agreed to join us because I was following the works on the blog and also, as we'll discuss, the challenging part of running Mastodon server. But today, we will be focusing on the observability. and Hazel wears many hats besides being,
SPEAKER_00as I mentioned, the infrastructure witch of Haki Derm, a popular Mastodine instance. She's also the director on the board of Haskell Foundation and she's also like really into observability, and she's also the principal architect. So I'm really, really happy that you agreed to join us. Thank you a lot. Would you like to tell a bit more besides what I talk to our viewers and listeners?
SPEAKER_01So I'm actually really happy to be here and I'm going to have a lot of fun chatting. I wear a lot of hats. I have a lot of thoughts. They never stop thinking. They never stop thinking. And I also am the first fellow of the Niveling Foundation, which is a nonprofit focused on trying to understand and figure out how to teach the open source community and the world How do we go from a project into a community and into an ecosystem?
SPEAKER_01Because it turns out every evolution is this massive cliff. And you just get there and then nobody's taught you how to scale it. And nobody has any tools for you or assistance. And so you just kind of flounder. And so many meaningful, worthwhile things. beautiful projects or communities end up dying because they just don't know how to navigate the complexities of getting beyond a certain threshold. And so I'm trying to help figure that out.
SPEAKER_00That's cool. And that's what we are also today here for. But thanks for mentioning that, because as we discussed before the recording, the first time I saw you and the team saw the further foundation, was when I joined the HakiDerm Mastodon server after the Twitter start to sync. But then immediately you got also like a huge amount of traffic,
SPEAKER_00which in my opinion shows kind of pretty well why do we need the observability and monitoring? Because That was the time where many people were starting to try the Mastodon or other Fediverse tools, but it appeared of what I saw at least from outside that they were not entirely ready for running on such scale, especially that your server got a really big traffic from many people from IT world.
SPEAKER_00that joined. Could you tell us a bit more? Because from my outside perspective, it looked like you built something for the community and then the tooling was not there. The scaling part was not there. It was hard to understand what's happening inside. Was it really like a black box?
SPEAKER_01Yeah, so her perspective and context for some people. When we first had Hackaderm, it was originally, for Krishnova, a toy project. So she had her servers in the basement, and they were running whatever. They had, for the file system, an experimental developer fork of ZFS with weird, you know, debugging processes parameters and experimental things and hacks on top of it.
SPEAKER_01There was Kubernetes running a bunch of custom weird nonsense things. It was a hacker toy playground. There was absolutely nothing on that entire set of machines that was production ready in any way. And she decided one day I'm going to play with Mastodon because Twitter isn't looking great right now. And let's just play around. And so she had a couple hundred people on it, but not a lot. And then all of a sudden, by the time I joined, there was about 700 people.
SPEAKER_01And then in November, we went from 700 to 5,000 in one week. And we went from 5,000 to 15,000 in one week. And we went from 15,000 to 25,000 to 35,000 to 45,000 to about 55,000 people at peak in four weeks or so. And so that is true exponential scale. And when you hit real exponential scale,
SPEAKER_01one of the really interesting things about it is you don't know what's happening until it's too late. And so that's exactly what happened. We had no idea we would get the momentum we did. We would have prepared a couple weeks sooner. And had we prepared a couple weeks sooner, we may not have needed to do a whole bunch of things. We may have completely prevented the entire week-long incident that happened. But instead, we were slightly too late, and then we ended up chasing the exponential curve the whole way up.
SPEAKER_01But in terms of monitoring and observability, that's a turkey one. And I hate the term root cause. But the root cause, quote unquote, of the whole thing falling over was besides some inefficient tuning or some system, whatever, we had two feeling hard drives. And so the two feeling hard drives caused the disk to be really, really, really slow. And it caused a lot of disk errors.
SPEAKER_01And so you had the database and you had sidekick queues and you had Mastodon and you had everything doing a whole bunch of file system calls on a feeling hard drive. And we were doing the simple, naive, default solution for Masterson, which is NFS. So it's a networked file system between all the different computers. And so NFS requires that you make a whole round trip with a file system column.
SPEAKER_01And you do this sort of synchronization thing, and it ends up being really terrible for a whole lot of reasons. But primarily, it's because You don't want the network to be at the bottom. But you definitely don't want the disk to be at the bottom. But they have to be really fast. And our disks were not fast. Because they were feeling they were broken. And so we were getting like maybe 11 to 20 IOPS. Which are, you know, IO operations per second.
SPEAKER_01Which is, these disks were rated for, I want to say, I don't know, 200,000. 500,000, so somewhere around there, there are solid state drives. And to go from, you know, the 200,000 you normally have to, okay, you stripe it, you raid it, you whatever, maybe half that, to 30? You can't scale a system on that. And it turns out social media does this thing where you read from the disk
SPEAKER_01constantly because the disk is where you store the media. And so people look at images and they look at emojis and they look at all kinds of weird things you wouldn't think that are on the disk but aren't. Like your favorite button, that's on the disk. That's a disk read. So it's this, you're serving the web server from the disk. You're serving everything from the disk. Everything is hitting it. So for it to be the bottleneck caused so many cascading failures, it took out the entire system.
SPEAKER_01And when we ended up doing a partial migration to Europe, we kept the NFS. So now we have a failing hard drive. No way to really find out that it's failing. And we're doing transatlantic NFS. which is adding note 10 at the latency on top of a very, very slow and feeling file system. And if that file system has to repeat a system call because of errors. Ooh, that's around every time.
SPEAKER_01So that made it so much worse. The fact that Postgres did not just completely fall over in that scenario was wonderful piece of software. But yeah, if I look back at this, and this is a long answer, but if I look back at this, and I think, how can we have known? It's easy to look for the answer if you know what the answer is, right? It's easy to look for the answer if you have one or two different things.
SPEAKER_01And we're intentionally running the simplest, kind of most naive type of solution we could. And we're still a team of world experts at this. Missed it for a week. I always say the person who kind of noticed that our Grafana graphs were weird and wrong on their file system. But we still all missed it for a week. But I think the biggest thing that it really, really comes down to is OpenTelemetry would not have solved this particular problem.
SPEAKER_01Or WideEvents and Whitespans would not have necessarily solved a particular problem. The problem was really that we were able to see all the individual pieces. And we were able to kind of look at all the different ones. But can you correlate the different bits of information to create a coherent story in the system of what's happening? That's really hard. And if you can do that, that's your superpower.
SPEAKER_01And OpenTelemetry gets you that. But in a certain way, it's really the magic is not the wide events, which a lot of people think it is. The magic is actually the correlation. Can you correlate the data in different ways? And the wide events make it easier. The most open telemetry, like most observability and instrumentation people implement doesn't put, say, the... amount of web traffic together with the what you're doing to the sidekick or to the
SPEAKER_01database and they don't put that together with what are you doing to the file system and they don't put that together with okay but what's the actual system performance at this time and getting all of those together is what we would have needed to look at this and go oh Every time we get this massive backlog, it's because our IOPS and performance of the drives crashes. The two out of five drives are broken.
SPEAKER_01If you're trying to read one of the broken ones, that's not going to work. But how do you know that without carefully crafting that together?
SPEAKER_00Yeah, that's also like my, I'm not sure, concern is the good word, but to be able to, because most of the advices that I see on the internet about how to apply open telemetry is just put as much data as you can, because you can't predict what you're going to need in the future.
SPEAKER_00But then to be even able to correlate, then you cannot just throw data in because in my opinion, to some degree, you will be getting the classical issue of the garbage in garbage out. plus extreme extrapolation of the costs. So do you have some hints how to design those, at least on this instrumentation strategy to be able to correlate this data? Because of what I noticed,
SPEAKER_00the main challenge that people are having at the beginning is quite close to what we had in past with logs. So how to structure the data so we are able to get the answers and to ask the questions in the future. So how to correlate the data, as you said.
SPEAKER_01Yeah. So that is a really interesting question because every observability vendor is going to want to say that you can do this. And they're all, all of them insufficient in certain ways. But whether or not those ways matter for you and your business or your project is very, very, perhaps even individual. And so it's hard to give a recommendation. But if I look at the observability history,
SPEAKER_01And tie that together. I'll take you through that. And then that'll help. So charity majors came out with an observability 1.0 and 2.0 reframing of the what is observability question. Because historically, that was sort of a way to help contextualize the what are white events and why do they matter? And the way I actually like to think about it is not really about the 1.0 being one
SPEAKER_01type of property and 2.0 being wide events. The way Charity talks about it is 1.0 is many data sources and non-correlated data. And 2.0 being as a defining feature everything is in one type of data and you just shove it all in there, which is close, but they both focus on the technology and implementation choice rather than the business benefit. So to me, Observability 1.0 is when the types of questions you can ask your system are picked
SPEAKER_01when you ingest the data and or create the telemetry. If you're sitting there going, this is going to be metrics, You pick it. You send it off. You aggregate it. You ship it into a Prometheus endpoint. It gets scraped. You send it off, right? Or you send it to Datadog with them or you send it to any vendor as a metric or as a log. You pick at ingestion or creation time the questions you're going to ask or the capabilities you have.
SPEAKER_01Observability 2.0, the fundamental shift there is the question is pick the query time. You can do everything with both. But it's the mindset of, do you pick the question at query time or when you create the data? If you pick it at query time, you have to bias really hard on sending more data than you think you need. But it has to be useful data, which is where a lot of people run into a problem. And so for me, the thing that makes this framing better, well, not better, but nicer for me,
SPEAKER_01Is if you think of a question you pick at the query time, a question you think of when you're looking into the system, then the answer you think of is not, well, how do I pick what data to store? It's what data will let me ask more interesting and meaningful questions. So if you're doing Ruby on Rails, you probably really care about the queues. You probably really care about the database and you care about the endpoints. And because it's an MVC,
SPEAKER_01you want the endpoint, the model, the view and the controller to be correlated together because they're in one kind of unit and need to trace that. And then in there, it's almost always a database call and almost always some sort of queuing call. And so you really want to be able to link those two together. So now I can go, okay, what will help me link the queues to the MVC to the database? If I can get those three linked together,
SPEAKER_01then I have a really, really strong foundation and starting point. And then you're starting to see one of the challenges with observability 2.0 and wide events, which is that you can't actually stick everything in them. You want to. But things like profiling data. or performance data or some types of system data doesn't make sense to stick in a wide event. Like if I have a wide event that represents an endpoint of fetch a post,
SPEAKER_01what does CPU utilization look like? Is that a one-time snapshot? Is that like what? CPU utilization for the whole duration of this is actually useless information because I want to know not just this call, but this call, you know, minus 30 seconds after 30 seconds. I want something that's disconnected from the span, but correlated. So that's where I get into, and I'm going to write a blog post on this soon,
SPEAKER_01but I have observability 3.0 that I think about. And so the fundamental defining feature there is observability 3.0 happens. when you focus on the business value and the business context, and you take your system and you are able to frame it in terms of the business value. So for example, one of the huge problems we ran into with Mastodon and scaling hackaderm is the key
SPEAKER_01design of Mastodon is not Typical to what you would do in a modern application now. So in a modern application now, really good cue design focuses almost entirely on the performance profile of the cue. And you break up all of your topics or all of your messages. And you know this from event streaming. You break a lot of things up, not necessarily into semantic topics. You break them more up into, I need a response within a minute.
SPEAKER_01Or I need a response within a day. Or this is, you know, what are the performance characteristics of the queue that you care about? And that's a lot more useful 90% of the time. Then I want to put this in the add a follower queue. Or post a message queue. And Packaderm is focused on that. So Packaderm or Mastodon rather has like a queue for the federated stream.
SPEAKER_01They have, which is new, they have a queue for posts, something for immediate processing, something for like messaging, basically a semantic topic, which is useful when you're developing. You can just write out submit job to blah, blah, blah. the job queue or submit post in the post queue. Super useful, but it means that when you're trying to scale things up, what I would have to do is I figured out what all the queues were used for,
SPEAKER_01what the perceived performance of the system was, and then optimize the queues to degrade unimportant performance in order to improve the perceived performance for people. For example, the federated feed is by far the most compute-intensive thing in the entire Pachyderm Mastodon thing. It's a massive firehose that almost always involves pictures, which involves downloading things to disk,
SPEAKER_01re-encoding them to disk, saving them, uploading them somewhere, and then serving them out. It is a huge computational drain. But people generally don't care that much. Unless you go to the federated feed. The federated feed is stuff that you don't follow. Stuff that you're not directly interacting with. But it's related to something someone else is doing somewhere in your server. And do you follow them? Do you care about that?
SPEAKER_01So the federated feed can lap six hours behind where it should. And barely anybody can notice. But if your post takes more than 10 seconds to fire off when you submit it, you're going to have a break. Because that is going to break your experience. So before, but before I want to say 4.1 or 4.2, we could not just split those two up. Because they're all posts.
SPEAKER_01So if I wanted to submit a post, I had to take care of the whole federated feed. And I had to handle all that traffic in order for you to post something rapidly. And that meant that the system was just super inoperable because we needed to go for provision. Everything needed to work great. You had to handle massive bursts of traffic just so that people had their interactions performing. I'm going to be focused on the business value. You can go, oh, this queue takes up 90% of the server time and offers 10% of the value.
SPEAKER_01We're going to rebalance that. We're going to turn it all the way down so we have more space over here. And that's great. That's awesome. You should be able to do that. And if you think of the business value in the contest and you start answering questions that are meaningful for the wider business, not just for the engineering team, that gives you so much insight into what do you actually need to do to monitor your system, to improve it,
SPEAKER_01to get that performance where you want it to be.
SPEAKER_00Mm-hmm. Yeah, I like that on your blog article, you also even provided multiple questions from multiple people, like an engineering director. So for instance, that someone would like to analyze the trade-offs and the reliability of our system on specific parts so they could maximize the value delivery and all that stuff.
SPEAKER_00So I like your answer. I fully agree with that. So then the question is, because for me, it's like we have two forces, distinct forces pulling on one hand and to each other. So what I mean by that, it's like on one hand, we have this manual instrumentation crafted with the business in mind. And on the other hand, we have this unknown and storing a lot of data like from auto instrumentation,
SPEAKER_00eBPF and all that. you know, tooling that can lock entirely everything. And then we have the reality check with the vendor tooling. So even if you put, so the more data you put, the higher cardinality of your data is because you have much different data that you cannot easily index. And then those databases, because underneath there are databases, they cannot easily scale to support those filtering and getting the answers to
SPEAKER_00those questions. So from my perspective, it's like with this... from Family Guy GIF with the Peter Griffin that pulling this Italian and just broken one way or another. So do you think that we can somehow balance that maybe in mentioned by your observability, the next generation, so 3.0? Because I think that for now we have a lot of, let's say, marketing.
SPEAKER_00then we have this reality check of one hand that developers don't want to think about and put the observability as the centerpiece of something as part of their design and then vendors that are giving promises, but not delivering, at least not all of them those. So how can we somehow find some middle ground or can we actually find some middle ground to support that? I know that it's a long question, but yeah.
SPEAKER_01I think there is definitely a middle ground that's possible. It does require some compromise and reframing on everybody's minds. So kind of walking backwards, engineers are going to need to care a lot more about the system and the end users and how the business value actually gets delivered. It turns out that going to some research out there on developer thriving or psychological safety or high-performing teams,
SPEAKER_01a lot of developers actually do want to care. They're disincentivized by the business not to, or they're having the information hidden away, or it's reaching out to the customers is not your work. And you have, you know, your work to do and you need to have performance. Or a lot of how we think about developer productivity is directly countered to developers understanding the business needs and the business values. And so then developers don't understand that they have this disconnect.
SPEAKER_01And then they don't necessarily want to do the thing because if they're worried that they might get fired for low performance, why would they spend time on something that is explicitly labeled as low performance? So that's, developers need to care, but they also need the system to allow them to care. And engineering leaders and business leaders need to understand that there is a thin line to walk between motivating developers to care
SPEAKER_01and then giving them so much rope and slack in their schedule that they spend their entire time just discussing things, talking with customers, not really sitting down and delivering stuff. So you do want this rapid iteration of feedback. You want the feedback loop to be complete, and you need the appropriate motivations and pressures in the system to keep everything tuned. And it's a really, really hard balance. But then walking back a little bit to the vendor promises and everything else.
SPEAKER_01One of the things that's tricky there is you have. The history of open telemetry and where it came from, and the history of distributed tracing, and then the mismatch of how companies can implement it, which leads to a very different usage pattern and shape of data. They're walking all the way back. Distributed tracing used to be entirely manual. We had no such concept as automatic instrumentation. And so a lot of people discovered that columnar databases are an ideal use case
SPEAKER_01with a fork join pattern of querying the database in parallel stuff and everything to a column, and then you don't need indices. Everything is super fast. You can just grab the data and pull it out. And all of the first observability systems out there in places like Meta or Google really emphasize that kind of construct of manual traces. and this columnar database where you can slice and dice. Those three things. But it turns out,
SPEAKER_01very deeply embedded in that slice and dice of the columnar database is the assumption that because it's a manual trace, you really only have about one or two spans for the whole event from the end user perspective. Like, you know, the API call, And everything's on that one span. And then if it calls out to another microservice, everything's in that one span. And that calls into another microservice, that one span. And typically it's microservice, microservice, and they're not nested necessarily.
SPEAKER_01So the depth intrinsically is about three. If it's anything further than three, it turns out OpenTelemetry and all the distribution stuff really starts to get very creaky. And then if you want to instrument the front end, well that's another layer. And so the front end means that the back end can only be of depth about like one or two. Otherwise you're just not going to have enough room in the span to handle the front end and its complexity and the back end and its complexity.
SPEAKER_01But if you think of that, and you're probably thinking to yourself, I've never seen a trace with that few levels of nesting. That's because of auto instrumentation. The auto instrumentation and the SDK and the design of open telemetry make it really, really hard to collapse the trace. So what ends up happening is you end up with a super common situation of the backend is auto-instrumented, which means you have a span for starting to run time,
SPEAKER_01you have a span for an endpoint, you have a span for processing things, you have the generic HTTP framework, you have your framework, you have the middleware, and then you finally have your logic and you're already like 15 levels deep. And you can't collapse that very easily, which makes the slicing and dicing ironically very hard. Because you need to join different spans, and you can't do that in a column in a database. So the whole premise of observability starts to fall apart. If you use automatic instrumentation,
SPEAKER_01you have to really, really dial it down and be very careful about how you use it. which doesn't, you know, seem like a problem, right? You just write the automatic instrumentation and then eventually swap it out with manual instrumentation or you curate it or you... And that also poses the second assumption, which is that you have full-time people working on observability that care deeply about it, that are willing to be an expert, and that want to dig in and understand the system holistically,
SPEAKER_01which turns out Product developers are almost never given the time required or the permission required to work on tech debt or observability or any non-future work. So, of course, they're not going to be these people. The DevOps platform kind of people have the whole company to support. If they try to work on an individual application, they just never get anywhere. And so they are really,
SPEAKER_01really looking for a one button, hit the whole enterprise, hit every application, do something. They also don't care about the business value because to them, well, they don't care about the business value from the perspective of the product developer because the business value for them is the product developer, not the customer. It's good people, but it's really hard to have that.
SPEAKER_00And also quite often the decision makers in terms of which observability tooling to use are the SRE or ops people, and then developers are asked to just align with those decisions, which is also challenging.
SPEAKER_01Yeah. And if a developer is more comfortable with one tool versus another, then often just doesn't matter a whole lot because the tool is already chosen for maybe security or regulatory reasons. Maybe you got to deal with a vendor, maybe. And there's about a million different reasons where this could be happening that have almost nothing to do with how useful is it.
SPEAKER_02Yep.
SPEAKER_01And, um, So yeah, it gets very challenging. But in terms of concrete things, in terms of sitting down, doing stuff, There is a person, Jeremy Morrell, he wrote a blog post called A Practitioner's Guide to Wide Events. Yeah, that's a great one. And it's actually a very, very good article. Yes. It has a lot of actionable advice, but it also starts from the middle of the story.
SPEAKER_01It starts from, you have everything set up. So if I'm coming into a company, And I'm looking at the company right now. And they say, I don't have observability. Where do I want to start? The first question is, what are you running for your infrastructure? The second question, what you ask at the same time is, what hurts the most? You should not start your observability by trying to get a good picture of things. You should use it to immediately solve a business problem.
SPEAKER_01So are all of your office teams rooting out because of on-call on the system? Oh, that one. Or, you know, is one system losing sales deals because the system is unreliable? That one. Start with that one. What's the pain point for the system? And then what's the pain point for the business? And what's the pain point for the operations or platform team? Identify those two, make them as similar as you can.
SPEAKER_01Ideally, make them the same, and then solve that problem first. And then if you are running Kubernetes, like most people are at this point, then you should probably install the OpenTelemetry Collector, Grafana, Prometheus, a couple other things, just install it. And then with the OpenTelemetry Collector and the OpenTelemetry Operator, Hit everything with more or less useless data. Just grab something.
SPEAKER_01Something from everything. And then start shoving it into the collector. Take the collector. Shove that data into an on-prem visualizer. And then to see what the hell is happening. Once you get the data to almost close to useful, just without talking to the product teams or without talking to anybody else, then figure out the shape of that data,
SPEAKER_01figure out what works for you, what works for whatever, and then start to use that to inform, okay, we need a vendor. Let's reach out. Here are our constraints and what we need. Here's our set of volume. Here's our so on and so forth. That helps you a lot with helping negotiate and make sure that the vendor that you pick is one that's actually going to suit the developers and the business. It turns out you don't necessarily want to involve the product people yet because
SPEAKER_01the business incentives are rarely aligned for that. If you involve them too early, you're going to switch tools on them. A lot you're going to putter around and break the workflow. And this is a time of experimentation. I need to solidify a few things before you really involve them. Let them know. If they're curious, they can come in and join. But don't necessarily ask them to come and join before you're ready for them. And then with the product teams,
SPEAKER_01the most successful method that I've ever seen for the product teams is to grab headcount, either from the product teams or from the ops team, just for a whole quarter. This headcount allocation does absolutely nothing except to go through every single code base and set up the default instrumentation, set in the default things here and there, maybe write a little wrapper library or something, and then do manual instrumentation in one part of the app.
SPEAKER_01Usually, usually the login page. So you can, you know, take the login page and you can Take a session ID or a user ID or something, tie that to a persona of something in the sales team. And then put that on the root span. If you do that one thing, and I mean that one thing, the sales team will love you forever. And your business team and your product team, everybody will love you forever.
SPEAKER_01And here's why. You can use that persona thing to identify the whale. Your whale customer or your very, very high value customer. And you can slice and dice things by high value customer or by customer segment. If you can do that, that immediately gets the business to understand, oh, this nerdy engineer thing can help us understand the system from a technical point of view and a business value point of view.
SPEAKER_01But the teams will never have time to do this. If you ask them to do it, it'll take months, it'll take quarters. So you have to just say, we're going to grab a couple people full-time, run through, and have those people do absolutely a thing, but the manual instrumentation and the setup just over and over and over and over. They're going to get sick of it, and they're going to get tired of it, but they're going to get really efficient at it.
SPEAKER_01And they're going to do some rip through the code base, make a whole bunch of pull requests, and do that. When that happens, when that's through, when that's done, you are good to go. The second piece of manual instrumentation you should probably put, if your auto-instrumentation doesn't already cover it, is what git commit is this code. Super useful. Almost nobody puts it in there. But between that and the customer segment, everything else can be later.
SPEAKER_01But once you set up that skeleton and developers can low effort, see the code and copy paste it and do their own thing, you are good to go. You are, it won't start happening. You've lowered the barrier of entry. And that is the magic of observability is lowering the barrier of entry. If it's too high, people are never going to want to sit down and understand it. They need to almost accidentally be able to learn it rather than have to dedicate time on the weight.
SPEAKER_00Yeah, that sounds great to me. That's a great piece of advice. Thank you. It's also quite aligned to what Gojko Adjic in the previous webinar told that for engineer, if someone is thinking like whether it's useful or not, or how maybe even to get into the discussion with the product people is to give them data. And what you said is a really good starting point on having those meaningful data for both sides.
SPEAKER_00Definitely, I really like it. So about also this connection, because I'm coming from the event sourcing, event-driven community, and there is an overlap in thinking about events, because here in event sourcing, we have those, let's say, business events. And in telemetry, we have events which are kind of looking similar because we should also put a lot
SPEAKER_00of context. We can also use both of those events to make the business decisions. The regular business events should also be correlated because we should know what's the order and what's the business process behind them. But to me, they sound a bit different, even from the perspective that you mentioned. From how I see most of the people are doing telemetry, then they have those traces polluted with the
SPEAKER_00technical information, which is fine for debugging. But if business is coming to us and asking, you know, like, hey, could you tell me how much, let's say, dropped basket do we had in like last five days? Or what was the... let's say, potential reason for that, then if we have those pre-aggregated by some traditional BI, then that's easy.
SPEAKER_00If we have some solution like big data for events, we can also query them. But can we or should we use like telemetry data, in your opinion? Or how do you put the difference between, let's say, traditional events in terms of event-driven way and those from open telemetry and observability tooling? How would you put the, let's say, differentiation between those?
SPEAKER_00Or maybe there is no. What's your take on that?
SPEAKER_01So I think my take on that really is more, and I'm actually going to ask you a question on this, which is, if I think about an event in open telemetry, what I'm thinking about is... My definition of observability is a process through which one develops the ability to ask meaningful questions, get useful answers, and act effectively on what you learn.
SPEAKER_01Every time I'm doing an event, I'm thinking, what are the meaningful questions I can ask for this? What can I expect to learn? And am I going to be able to take action on that? And then when you end event driven design, when you write an event, what are you thinking of?
SPEAKER_00So I'm always saying that I should start with asking what actually has happened and record all of the meaningful data about what has happened in that event. So all the potential business context, and then there are some stuff that you like known knowns and unknown knowns. So those stuff that you can prepare. So let's say for now, I know that I need it for this read model, that read model and this aggregation.
SPEAKER_00But then in the future, if I have this data, then potentially as the business grows, then I can be building other type of aggregation or doing some data drilling. So that's why, It's important to think, in my opinion, of what has happened, not as many people frame it what has changed, because what has changed is already interpretation of what has happened. And that's losing the business context, in my opinion. So at least that's how I frame it and try to explain to the people.
SPEAKER_00So it's kind of similar, I think. But more focus on the business. more for getting insights rather than not necessarily debugging how telemetry is quite often promoted by the people.
SPEAKER_01Well, so you mentioned insights. And to me, the insights are really also at the heart of open telemetry or just observability in general. It really is about insights as well. So I'm curious. I'm going to dig in on the insights. So let's, for example, talk about a system in which someone is buying groceries. From what I read online, a common mistake people do is something like they create an event of,
SPEAKER_01you know, purchase basket. And the purchase basket event is going to have the whole list of items, it's going to have everything, the payment data, and you do a whole bunch of stuff in that one event. But usually at that point, most event-driven domain people are saying, that's not quite how you want to do it. Right?
SPEAKER_02Yeah.
SPEAKER_01What is the difference between a common mistake people make and then how you usually want to do it?
SPEAKER_00I think that there is a gray line because I'm always saying that events should be as small as possible, but not smaller. And it's hard to say precisely what does that mean? Because Many people believe that if you put a lot of data in the event, then you will have more information. But then if you put those potential redundant data, then actually it might seem counterintuitive,
SPEAKER_00but those events become less precise because each time you look on the data, you need to think whether this is something that actually has happened. And that's really related precisely to, so to give you a practical example, let's say that for user, you would be always storing their names or for address, you would store completely the full address. And then if you have some events, like let's say profile updated or whatever,
SPEAKER_00and if you try to put all of the data, then you will always need to try to guess whether this actually happened, how this relates, or maybe you just put it additional data because it was easier for you to make those aggregations. But then... those events, even if they have more data, then they are becoming less precise and actually are gathering less information, less precise information. At least that's the most common mistake that I see in designing the payloads or the structure of events.
SPEAKER_01Yeah. So that actually relates a lot to me in terms of ability because you mentioned this concept of, and let me know if I got this right. You mentioned this concept of you have payloads with maybe too little information. That's totally a thing. But you can also have too much information in a payload. And when you have too much information in a payload, you can no longer reason about the payload.
SPEAKER_00Yes.
SPEAKER_01Sort of in the context of extremes. Which that's really important to me because if I think about like this event stream, I want to be able to read it almost like this lock of events that happen because that's what it is. And so I read it and I go through it and I see updated profile and the whole profile. Did that update it? Is that what I need to update? Is that what if I get two events in order? And one is update profile and the other one is update profile, but they're actually misordered.
SPEAKER_01Well, which one is the real one?
SPEAKER_02Yep.
SPEAKER_01Or how do you think about that? For me, the way I can think about how to guide myself to the better design for observability is considering what the most meaningful questions I can ask are and how to ask them. I can send too much data. I can send data where I compute a whole bunch of information and I send it in there and it ends up being really, really not useful. Mm-hmm. Because I have the source of truth and the derived data and then the derived derived data.
SPEAKER_01And so I can guide myself to an example by asking what's a meaningful question. So how do you ask yourself a question that lets you know that you need to refactor an event payload? And what is that kind of question that lets you gauge whether or not one payload is better than another in terms of design?
SPEAKER_00So I usually start with the smallest possible amount of data that is meaningful for this business operation. And then I'm considering other needs, like for instance, whether I know already that Some other workflow can be triggered by this event or maybe whether this event is part of my internal module knowledge or maybe part of the should be,
SPEAKER_00let's say, bigger if it relates to the whole part of the business process. So like the distinction between private and public events. So probably it's quite similar, I think, to what you're driving is that I'm doing some simulation of why I would need this event. So maybe for this type of read model, maybe for this type of workflow integration, or maybe I can have some sort of
SPEAKER_00gut feeling or let's say domain expertise that this is the data that I don't need at this point, but in the future, they might be really needed.
SPEAKER_01How do you know or how do you get that intuition on whether or not the data might be needed in the future?
SPEAKER_00Yeah, so that's a magic part. Unfortunately, it's like, there is always this part where you cannot, you know, predict everything, but you might try to guess and then the guessing is... of course, either more or less correct. And that's not quantifiable, at least in my opinion. It's hard to say. Besides talking with business people and people that have more knowledge or more expertise,
SPEAKER_00without talking to them, it's hard to say whether you will need them or not.
SPEAKER_01Let's dive into a concrete example. You mentioned previously an update person kind of event. So what if I'm designing the system and I'm thinking smallest possible event and have a form field. And for the update form field, I'm going to, for every field, basically have its own update event. So if I have the, you know, if I have the name, it's going to be an update name event with the user ID and then the new name.
SPEAKER_00Is that a good event? Actually not, because then it would be like a property sourcing. So you would have extrapolation of events. So typically, I mean, those types of events are more state-based. So I would typically group them with some category, like personal data updated with information, whether this part was updated, which exact fields were updated. Because then actually business don't care whether the first name or last name was updated,
SPEAKER_00but they care about, okay, someone updated their personal data or maybe they changed their surname. So possibly that can mean that, let's say, they got married and changed the surname or maybe changing email is... also property but then it's usually related to more business information so yeah so that's also the example where grouping the data and giving making a bit bigger
SPEAKER_00events can be more meaningful for for business people yeah so then here's the next
SPEAKER_01follow-up kind of really fun one. So I take care of it. And I say I'm going to have an update profile event. And I'm going to just stick all the new fields in the update profile event, only the changed ones. Not the rest of the profile, just only the changed ones. And then I'm also going to, if they update their credit card information, their billing information, the plan details, anything associated with the user account, that all goes in there.
SPEAKER_01Is there a problem with that?
SPEAKER_00Yeah, I would typically break them by the business context because changing card information is usually important. Sometimes you can trigger some fraud detection and so on and so forth. In general, like profile updated is not great type of event because it doesn't give a business context about what has happened. It tells what has changed, which is not... Like, of course,
SPEAKER_00sometimes it can gather some value, but typically business care about what user actually intended to do and what has happened after this intention. So... Probably those events would be more like payment method changed or defined or user removed the payment method or maybe VIP status was assigned or so on and so forth.
SPEAKER_01I love that answer because I'm going to take that and I'm going to tie that back to whichever one needs. You gave me the answer I was hoping you would. And so I'm going to pull the things out there that was really, really stuck out to me. We started with an event that was too small. And you're like, well, you're going to have, you know, a hundred of these every time you hit the update button. And that also has no meaningful context. The business doesn't care about that. They care about if the personal information was changed.
SPEAKER_01And then I went too big. I said, what about the whole profile? And then, well, that doesn't give you, in the business context, a meaningful separation. Because if you update credit cards, that's a whole separate line. Like, you need the fraud detection, you need them So business context. And then also sort of the operational, what questions can you ask? Or how can you observe this? Or how can you think about it? And you started actually doing this observability-driven design in it, even though it wasn't observability. So if I take this back to observability,
SPEAKER_01Am I going to have a new span for every single field? No. Am I going to stick the whole profile page whenever I hit the update event button or update profile button? Am I going to stick the entire profile in that one span including the credit card data? I mean, I better not. One thing, you shouldn't stick credit card numbers and everything inside, you know, your telemetry. Don't do that. But even if you did, you can sample it out and you can, like, mask and obfuscate it.
SPEAKER_01But goodness, don't do that. But it turns out that, like, you know, profile information, you know, personal information, maybe addresses, maybe the VMP status thing, all those are useful and different. And so I'm thinking of the observability of this. Like, you know, user profile management. I want to know when people go to this page. I want to know when they update their information.
SPEAKER_01Like, when are they updating? What did they change? How frequently are they changing it? And then also things like, oh, here's a really, really interesting business contest question. How often are we getting fraud reports? How often are people changing their credit cards to find credit card information? How much of those end up being typos? How much of those? Or if people make a new account, how old is the account before they started adding credit card information?
SPEAKER_01Do they almost always add information only when upgrading to VIP? Do they add up before? Those are really interesting questions. So you might want to add that in there. of when you update stuff and you want to carry that kind of information around with the user, sort of conceptually in the system. Then you can ask these questions that you're wanting to think about with the event-driven design. Because if I'm thinking about observing the events and I'm thinking about observing
SPEAKER_01the cues and the behavior of, you know, all this event-driven system, If you're an engineer and your manager says, hey, I had a question from my boss. He or she is working with everybody else and they're trying to figure out how to prioritize the feature set. And she says, how many VIP users do we have? How often are VIP people updating? Like, do we need to upgrade our credit payment plan to have faster rendered processing?
SPEAKER_01Or can we just say, put a button on something that says your update will clear in a day or two? How do I answer that question? I would like to be able to open up a vendor, you know, tool or observability tool and say, Oh, yeah. 20% of our user base is VIP. When they do the VIP, they almost always add the credit card payments at the same time. Very few other people do.
SPEAKER_01So basically, 90% of the time we add credit card payments, it's for VIP people. And in the same session, they purchase something. So they want that information to clear real quick. So yes, we should absolutely pay more for expedited credit fraud checking or whatever in our payment system. That's useful. That's meaningful. And most implementations of instrumentation cannot answer that question.
SPEAKER_01Most people never figure out how to phrase that question in their system and they never build a system capable of answering that question. So then your director, she has nothing to go off of. She's going to talk to the engineers. The engineers are going to say, I don't know. They're going to guess. She's going to take the guess and say, this is a guess. I don't know. Anyway, we're paying $2 million a year for our observability stuff. We're going to need to upgrade that to $3 million a year because we're using more. And the entire rest of the business is going to go, cool story.
SPEAKER_01Cool story. That's a lot of money for... You can't even answer a simple question. Yep. That we care about.
SPEAKER_00Yeah, so for me, the challenge is... It's kind of... related to both social stuff you mentioned, but also the technical part, as you said, like the vendor tooling, of course, some are better in those slicing and dicing, but in general, all of the vendors, if you ask them and knock them, then they will tell that they are designed to keep the data for a relatively short period.
SPEAKER_00And they are not like durable. And then depending on your size of your wallet and your strategy, you might be losing this telemetry data pretty fast. And for instance, in event sourcing, you are intending to keep this data potentially either forever or at least for as long as you will need them so at some point i had a weird idea that what if we like
SPEAKER_00put those business event directly in the telemetry tooling because you know this uh high cardinality and the slicing and dicing but then uh it always appeared that actually we are not there yet and what's your opinion where would you put it in like technically in like different tooling or how would you correlate those information uh
SPEAKER_01So this is a really tricky question because it has a lot of different factors. A huge factor is when you look at the usage patterns of people. And look at the data that helps people solve real problems in the system. It turns out that any data older than three days is probably useless. You're actually really just not going to answer any question about what's wrong in the system.
SPEAKER_01Is it in anything, you know, Beyond three days. It's just too large of a context window. And so LightStep, the company actually used to have a three-day retention. Honeycomb has 60 days, and that's a huge selling point for them. Basically, nobody uses the 60 days. And even if you do, the answer is actually in not even 30 days, but usually seven. And if it's seven, it's almost always in the 3D window.
SPEAKER_01And even if it's in the 3D window, it's actually 90% of the time in the two-hour window. So in theory, the vast majority of your telemetry can be thrown away in two hours. The vast majority of what's left can be thrown away after two days. The vast majority of what's left can be thrown away after seven days. And the tiny, tiny little, little bit that's left over is around in here. And also the volume of events that you're getting in telemetry is massive compared to event sourcing.
SPEAKER_00Yep.
SPEAKER_01Or like in event sourcing, you have maybe 100 events per second in a decent application.
SPEAKER_00Yep.
SPEAKER_01But by the time the application is that size, your telemetry, you're sending like 3,000 to 5,000 events per second. And so storing that, whatever, real hard. And also the payload size of the telemetry ends up being larger per event because you have more not duplicated data necessarily, but in a sense also duplicated data. And so things like all the different fields you can lead, you stick them in there.
SPEAKER_01With event sourcing, you can really, really pare it down. Like I can put the user ID in here. Yep. But I might want five fields in the telemetry for the one field event sourcing. And so the payload size is larger and the volume is 102,000 times more. Storing it forever is just impractical. But there are plenty of companies out there where their telemetry exceeds one
SPEAKER_01terabit per second of volume. Are you telling me you're going to store one terabit per second of volume indefinitely?
SPEAKER_00No. Yeah. So my take is how much is it coming from that people are just shoveling everything as they are told and not thinking what actually would they need? Because I understand that there are companies that will always have a huge amount of data, but my guess is that like average type of system, even like, you know, let's say HakiDerm had a huge traffic,
SPEAKER_00but I wouldn't say that probably it wasn't technically and business-wise so complex system. Complicated, yes, but complex, probably not. So... do we actually like is is this amount of data that we put into the telemetry is it coming from how we are doing stuff or or this is how it should be like it i think
SPEAKER_01coming from a lot of different things one is definitely the rise of auto instrumentation and the rise of adding everything and using it and the rise of having multiple teams looking at the data and trying to make informed decisions from that does contribute a lot to the bloat of the size, but a lot of that bloat ends up being useful in the moment. So the trick is really, if you think of observability from that very point of perspective of what's
SPEAKER_01valuable for the business, what you get is actually the recognition that you don't just want sampling. You do want sampling, but sampling is only part of it. You want multiple tiers of sampling, multiple tiers of aggregation, and this very, you know, time-delayed, decay, half-life look of the world. So, like, for example, social media applications are super hard to build because they're a pathological
SPEAKER_01case of usage of data. the half-life for whether or not something's going to be hit is like an hour.
SPEAKER_02Mm-hmm.
SPEAKER_01So, the most amount of views happen the first five minutes, and then the next 10, and then basically for the first hour, you get like 90% of every view you're ever going to get. But then the first six, it's like three nines. And then... But it turns out people might go, oh, yeah, that one, you know, image from this one post from 12 years ago. I want to see that. I know I don't want to wait two minutes for you to fetch it from, you know, the warehouse. I want to know. Yeah. And so how do you reconcile that? And it turns out that, you know, hearing is really important.
SPEAKER_01But understanding the axis patterns and understanding how things are used in different contexts matters a lot more. So like for observability in 3.0, what I would like to see more, which is something that nobody does yet, is understanding the different use cases of observability and consumption patterns of observability and beyond just the developer, debugging the system, and being able to let you take that huge fire hose and input it in and understand
SPEAKER_01that after about two days, that fire hose is going to turn into a trickle. And then you can keep that data longer. And then that trickle might get persisted in various different forms in certain areas so that you can do, for example, quarterly reports. But the quarterly reports are certainly not going to go over 50 terabytes of data. They're going to have four bullet points. So at some point, 50 terabytes of data needs to turn into four bullet points. And we have no nice way in any of our systems to think about what are those useful
SPEAKER_01four bullet points of information for the different people in the system at different points in time. You end up with store the whole firehose. Or you do my favorite trick, which is you use the OpenTelemetry operator and the OpenTelemetry collector. And you use it in a distributed pattern. So you have a collector per node on your machine. And then you have an aggregator collector. And the aggregator collector grabs everything that has already been sampled with
SPEAKER_01head sampling and pared down. The data has been augmented and touched and correlated and takes that and then does tail sampling. The tail sampling lets you see the whole trace and lets you understand the whole system and then drop irrelevant things. When that happens, that helps reduce the firehose quite a bit. But then... Something that I don't see a lot of people do. You ship that off before you do the sampling into a raw bucket. And then you ship it off after you do the sampling into a refined bucket.
SPEAKER_01And this sounds like a modern lake house type of architecture. Yep. Because it is. Take everything you learn from the data, you know, observability community, the business intelligence community for the last four decades and apply to this. The same problem. And so you should have like a raw ingestion. The, you know, bonds, silver, gold. And then you can have maybe your gold is going to be four different buckets and one of them is going to be a metric or somewhere you're right,
SPEAKER_01like whatever. And then you have long term correlation. But you didn't pay buckets for it. But you also then, you know, need to break the vendor observability tooling to support a use case that nobody actually uses. You have the data where it's useful. And the best thing about that is if you take the old data and then you ship it off into, or like the gold or the silver,
SPEAKER_01one knows two, and then ship it off into your telemetry vendor, your observability vendor, then you can actually see in real time and understand how, like how effective your sampling is. Are people missing information? Are they missing data? If not, you can increase the sampling. If they missed the data, if they had to go back and grab it out of like a bronze or the raw tier, then you sampled too aggressively in one spot. And so that gives you a data-driven way to figure out how efficient you are without
SPEAKER_01understanding the system. And let you treat sampling as not just a cost-effectiveness thing, but actually as an SLO of how well do you understand a system? Because if you understand it super well, you can know exactly how it behaves and put that stuff really accurately and dig in and go, okay, guess what? We have this one page. We hit it all the time. It basically always works. We're going to sample this thing at 1 in 20,000. Except for this type of error,
SPEAKER_01which usually we keep all the errors, but this type of error happens pretty often. We're going to sample at 1 in 100. And you can start to really understand your system. And then if you misunderstand it, you can go back. But that lets you go, oh, The amount of times that we miss information goes down over time and the amount of times that we were able to cut information and not miss it goes up over time.
SPEAKER_01So you should constantly be able to peer down and sample over time as you learn the system better and you can figure out the edges. But then you have all these buckets. You have the raw, you have the silver, the gold, the bronze, the aggregation buckets, the different data stores. And you can just give that to your business intelligence people, your analytics people, your marketing people, your data science people, and they are going to have a field day for this thing. They want this information. They want to be able to stick it in Power BI. They want to be able to stick it in all these different BI or analytics tools.
SPEAKER_01They want to be able to correlate it, and they currently can't. You lock it away from them and prevent them from reusing your very expensive data. But some of the most valuable data in the mission is just a training like that.
SPEAKER_00Yeah, I fully agree. I had also like an idea that potentially, like, as you said, the event sourcing events are usually rather granular. They are not having a huge size. So for instance, even putting them into the telemetry and then doing some sampling based on those event types, uh and storing them in some other place then this could dramatically decrease this uh size of the data and allow to keep them longer and um so my my question around
SPEAKER_00it to follow up on like do you think that at least okay let's say differently i i i have a feeling that observability with the open telemetry, it's kind of flattened into the debuggability. I'm not sure if there is a word like that, but we are more focused on debugging instead of observing. And in my opinion, debugging is just a part of the observability.
SPEAKER_00What are your thoughts on that? As we discussed, we would like to discuss business metrics, business events or triggering, even alerting based on, for instance, okay, we see that normally we had at this time, let's say 100% shopping carts confirmed per second and now we have two then this is a technically
SPEAKER_00a business alert that could be set up in a similar fashion and as let's say those classical ops genie way but more focus on the business aspects of that
SPEAKER_01Yeah. So it turns out there's actually a reason for the focus on debugging in OTEL, which is that distributed tracing was invented with the motivation of taking that debugger experience of a monolithic system. And giving you back that debugger experience in a microservice architecture. That was the motivation behind its administration.
SPEAKER_01So if it feels like a debugger, if it feels like the tools are oriented around that and the focus is, is that because we spent, you know, over a decade solving this one particular problem of how do you create an interactive debugger experience for a distributed microservice architecture. And now we're finally going Okay, cool, that's great. But it turns out a lot of developers don't necessarily use that. They often struggle with implementing a good debugger.
SPEAKER_01And it's kind of expensive to do that for the amount of value that you often get that the business can perceive. So then people are going, well, we have this data and it's useful. And now we're starting to ask, what else can we do with it? But the motivation was originally creating a debugger for microservices. So that's why the focus is there. But in terms of you asked about like the shopping cart and things like that, I think a really fun exercise for domain driven or particularly event architecture
SPEAKER_01people is this question I'm going to ask you. How would you instrument your event sourcing system or your event driven architecture? to help you understand whether or not your events are poorly designed or well designed?
SPEAKER_00That's a tricky question. So definitely... I would try to distinguish the specific patterns. Besides the data that we discussed, then there can be some set of metadata that you would normally want to have. Like you mentioned, user ID, commit. the causation id or parent id the correlation id and all that stuff so we can
SPEAKER_00ensure that at least the events are having those basic metadata or let's say it doesn't have to be global but it could be even per business module or business specific type of events because we know Where are they coming from? So it can be different from different type of event. But regarding the regular data, that's much trickier, as we discussed.
SPEAKER_00Without knowing the business context, you don't know whether it is correctly or poorly designed, even data. So again, we are falling into this known unknowns and unknown unknowns stuff.
SPEAKER_01So how about maybe a more specific one? What if there's this pattern that often happens in an event event system where you have one event and it ends up getting used for multiple different things, but each different thing only wants a certain subset of the event. Probably at some point, someone looks at this and goes, this should really be three different events. And then everybody gets happy. Or maybe you have two different events and you always want both, which is the smell that makes you want an event, right?
SPEAKER_01Yep. So how do you detect that? How do you actually show that and see if you're using your events and consuming them in the rest of the system in a way that matches the intended usage?
SPEAKER_00Okay, so for instance, maybe give you a specific example. I'm not sure if that's what you are asking, but let's try. So we had the case, I was working on the hospitality management system and I was responsible for financial module. And we had the case where someone confirmed reservation and then we should create this financial account because after this reservation was confirmed,
SPEAKER_00then this tentative financial account should be created, which eventually should change into the invoicing. And for various reasons, sociotechnical reasons, we had a case where after reservation was confirmed, this financial account didn't happen. It wasn't created. And that was like unacceptable because then there is no invoice, there is no money.
SPEAKER_00There is like the main reason why this system exists is not fulfilled. So we had a service where we based on those business rules, we were correlating and aggregating and saying that, okay, if within, let's say, defined amount of time, let's say five or 10 minutes, this additional event didn't happen, then that's something bad and we should raise an alert or at least show something
SPEAKER_00that this should be handled this way or another. At the beginning, the user even couldn't correct that part and say like, okay, regenerate that for me. There was no feature like that, but... Some ops people could do something about it. So we were setting up, but it was more like a hand built and case by case based on the knowledge about the business process.
SPEAKER_01And so that one is kind of an edge case that most observability systems today don't handle, which is if you have a disaggregated component or a distributed transaction, how do you ensure that the entire state machine finalized? And it turns out that There's no generic nice way to include a state machine and to figure out a state machine is making progress and to make sure that it's completed and we don't have
SPEAKER_01any good tools for understanding that. And also people have to sit there and recognize that it is a state machine and that you can do this type of logic and that maybe you should. So are there good, oh, use an observability tool for that? There are no absolute good solutions there. But there are ways that you can think about encoding that information. such that you can start learning on it. So like, what if for every event,
SPEAKER_01and the event is part of kind of more of a distributed transaction, in that event you have an identifier of here's the whole large unit that everything's part of. And then that identifier, you also put the state of the state machine in it. And then you can go and look for, and you don't need to correlate things anymore. You can just look for, select all of the things where we have a starting transaction state. And
SPEAKER_01we don't have a finished state. That'll tell you everything where something didn't finish. Or maybe then you might go, well, this state and this state or essentially any state transition should not take more than five minutes. And then you can start learning on state transitions taking longer than five minutes. And you can start building this up in a generic way. That doesn't require a huge amount of business context, but it's still important to the business.
SPEAKER_01Like, you have to put that information somewhere. And that's not an auto-instrumentation thing. You just kind of need that information. Yep. But you don't necessarily need to encode, oh, you know, this is a shopping cart to start. You can just say, it's a sleep machine with this. See, I've sent that into a library. But that would be a really good starting point.
SPEAKER_00Mm-hmm. Yeah, there is also a challenge that in OpenTelemetry, you always have this tree structure where you have trace and then spans that are just a child of that. But for many business cases, it's hard to even distinguish It could be a part of the multiple traces, like, for instance, shipment. You could say, like, okay, it's triggered because someone made a purchase and then that initiated shipment,
SPEAKER_00but then some other... Person could say, OK, that's cool. But for me, it's not a part of the ship of the ordering process, but part of the inventory process. So from the place where it was put into the warehouse. So that's another challenge for this part, because there can be multiple contexts of where this event is coming from. So with that,
SPEAKER_01the way you typically solve that open to learn is similar to how you solve the challenges of long running spans. Long running spans and distributed transactions are actually the same thing. And what we're talking about is this distributed transaction of reusable components and the where it was invoked and why matters a whole lot more than whether or not it was invoked. And So I have an article that I wrote on the new stack, actually, of long-running spans and how to handle them.
SPEAKER_01But the summary of different types of techniques you can use for this are generally you can put a property in the span of this is part of this transaction. And then whether or not you are in vote the event at some point. Maybe you invoked an order handling event, but you invoked it from the purchase thing rather than from the update site. There's different context you can have it. And then so you can put that context in the actual span itself.
SPEAKER_01You might also decide to go and augment the span to different data. You might decide to link the spans because there's a linking functionality. And you can actually create a span, pass it to the parent, and then create a link to it. Or you can create the parent and pass it a link to the child. And you can do that sort of thing. You can create casual links. You can use the attributes. You can do an optional linking thing. You can, if you really want to, you can rewrite the trailer a little bit.
SPEAKER_01I don't recommend doing that because it's fragile and terrible. But you can. And then you can, there's other techniques you can use. But the idea of how do I correlate it? And rather than thinking of, does it have to be this, you know, tree form? Because it does really want a tree form. But it's more, how do I correlate things? And the tree form is implicit correlation. But you don't have to have an implicit correlation. You can have an explicit one.
SPEAKER_00Yeah. Yeah, I like it. So unfortunately, the magic is that there is no magic and we need to really understand the business and know what we are, what are our business process or core important from the business perspective as you underlined multiple times to be able to properly have this observability. So unfortunately, I mean,
SPEAKER_00Because open telemetry is always advocated or most of the time with these unknown unknowns and focusing that you never know what can happen. But a lot of time you just know more or less, or even to be able to store meaningful data, you need to know to some degree. And we are slowly getting to the closure, but I wanted to ask you, what's your take on metrics? Because I see that many observability people are saying, don't use metrics.
SPEAKER_00It's the old fashioned way. We don't do metrics anymore. We just query telemetry data. What's your take on that?
SPEAKER_01I actually have a different take on that for most of the industry. I like metrics. I like blocks. I like traces. I like all the things. And I think that they are all useful. Traces become exponentially more useful the more data that you store in them. And traces can be used and white events can be used to derive a lot of metrics data from it. So if you're in a situation in which you want aggregations of data and you can
SPEAKER_01derive those aggregations meaningfully and usefully from your white events, go ahead and do it. Those are still metrics. You can call them that. It's okay. But if you're in a situation where maybe that doesn't make sense, for example, system performance, or performance profiling, or monitoring your hard drives or servers, other, you know, properties like that,
SPEAKER_02or it's a continuous drive over time,
SPEAKER_01Getting a discrete chunking of it doesn't make sense. The continuous value over time, that makes sense. And then how you use discrete chunks is some type of aggregation. It's a perfect tailor-made, this is exactly what you use it for, for metrics. Any continuous value that you want to summarize or aggregate and represent statistically is a metric. Which means that service level objectives are a type of metric. Yep.
SPEAKER_01So all the people that say, oh, metrics are terrible, but then also praise the value of service level objectives are doing this loop around, talking bad about the thing that they praise because they're viewing it from the wrong perspective. A lot of the times when you, you know, talk negatively about metrics. It's really when you're trying to use metrics for things that it doesn't work well for. And one of the weaknesses of like having metrics and traces and logging and all these different pieces of data is that often you don't correlate them
SPEAKER_01Often you can't query across all of them. You can't reconcile between all these different things. And if you're ever in a situation in which you want to ask a question, that requires you opening up multiple different tools and looking at multiple different things and then kind of trying to eyeball it together in your head. You are fighting against your tooling and not to rely on the negativity. of lock-in and metrics and statistical analysis and these sorts of aggregated data streams come from.
SPEAKER_01With that being said, a lot of the modern observability tooling doesn't actually help solve that problem. They do the same pattern but they have a lot more flexibility because they focus on wide events. And you can put a lot of your metrics data in the wide events and you can start to create metrics from wide events So you can get some of that. So how do I correlate heterogeneous data streams? It's something that nobody has ever done. And that is at the heart, technically speaking, of what observability 3.0.
SPEAKER_01It's one of the enabling factors of observability 3.0. Having heterogeneous data sources, correlating between them, then having heterogeneous data destinations. And having, you know, this concept of continually changing the data, refining it, doing things with it over time, creating views, creating queries, creating, you know, this multiple in, multiple out, multiple forms, multiple views, multiple.
SPEAKER_01It's a different type of slice and dice. But if you have just one single data format, you can slowly reinvent a lot of that from scratch. With a database that you don't control, with a bunch of other things that you don't control, with a bunch of weaknesses that are hard to get over. Or you can embrace multiple data sources aren't bad. Multiple data solutions aren't bad. Multiple views, multiple perspectives, none of those are bad.
SPEAKER_01What you do need is a really flexible and powerful way to correlate things. Mm-hmm. Once you get that, once you enable that, and once you create the flexibility for people to do that in a way that plugs into existing workflows and helps enable new ones, that's where you get that business context. And when you take the business context and the understanding of it and embed that into how everyone sees the system and make those synonymous,
SPEAKER_01that's where you get that observability 3.0.
SPEAKER_00Yeah, that also really sounds similar to, again, to the premises of event sourcing, because then you are recording all those and capturing this business intention. And as the events are kept, let's say, forever, which is not actually forever, but until you need them, Then you can build those representations or read models depending on your current needs.
SPEAKER_00You can throw them out if you don't need them. You can fine tune them, create them on flight if you have enough resources to build that in memory. So yeah, it's really aligned with also how I see stuff. Let me check if I have some more questions from the community just to double check. But I think that we covered most of them.
SPEAKER_00It was really, really, yeah, we actually did. So I really, really enjoyed that. It was really super practical. So one final question, like, Would you do something differently if you were like younger Hazel fighting with the initial Heciderm issues? Would you do it something differently in terms of observability or could you do
SPEAKER_00something better to not like wait this one week, as you mentioned, with trying to understand and correlate data? Do you have something in mind?
SPEAKER_01I think the main thing that I would have done differently is there were two weaknesses that we ran into that made it hard to understand the system. One is that we didn't understand it. There's no information on how to understand it, really. And that's just not really solvable. But the important one was really that We didn't have a lot of observability and monitoring and things like that set up
SPEAKER_01before the incident started. We actually had to set it up halfway through, which is fine. We had some of it set up and then we added more and we were fine and we kept adding more. But something that was really crucial was we had no understanding of the baseline. We had no understanding of the expectations. So we were looking at numbers, and we were looking at the graphs and the charts. And if you don't know, this is a bad number, this is a good number, this is a great number.
SPEAKER_01They're just numbers. So we had, for example, disk monitoring. Did we know we can trust it? I don't know. Can we trust the data? Was one of the things. I would have made sure we could trust it. And then can we understand and contextualize the values in terms of good, bad indicators? Can we tie the metrics, the observability, the logging, everything into...
SPEAKER_01inference into an intuition of, is this good for the system? Is this bad? How representative of it is it? Those are all things that we didn't really have. And so the incident was essentially, let's learn the system. Let's build that intuition. Let's keep it alive when we do so. And then when we had the intuition, the observability, we kind of knew how to test things and we had the parameters.
SPEAKER_01All of a sudden, the solution falls out. And it's, oh, this is a failing. And I know that that's a problem now because I've seen the rest of the system. I've gotten this intuition. I've figured out a lot of the bottlenecks. And these numbers are really, really slow. These numbers are really small. And I can kind of trust them now. But before, we were getting like, you know, zero IOPS for so long. Or we were getting like, you know, maybe 10 or 20. And I'm like, that number is so small. Is that real?
SPEAKER_01Turns out it was. But like, is it bad? I don't know. Is that an overloaded disk? Is that a... It turns out they're failing. Cool. But now that we knew that, we can look at the numbers and go, oh yeah. And then we could check things. But knowing the baseline is something that I would have done before. If we have been able to maybe set up a known working server, like a known perfectly operational one,
SPEAKER_01Duplicate the monitoring and everything to there and establish a rough baseline. And then look back at our working operational system and notice that the performance is one to 10,000 times slower in certain areas. That's an anomaly. That's, you know, an outlier. That's useful. We had to rely on developing enough intuition and understanding that the capability that was set up was functional. And then finally knowing where to look. And all three of those are really hard and ideally you don't want to have to do that.
SPEAKER_01But you're going to need to know how to trust the numbers. You're going to need to know the range of them, what's representative, what's not. And so learning that sooner rather than later, really important. I would have done that first.
SPEAKER_00Yeah. Yeah. The, the reason why I ask because this story really reminds me a lot of project that's where having a, some people are calling good problems to have. So kind of being successful, although you were just doing that for the community. I mean, just So when people are starting with their idea, it works for the first initial customers like friends and family,
SPEAKER_00but then the real traffic comes and you realize that you don't know what you're doing. So thanks for those insights. And in general, I can tell that you were doing that really well. I was looking on those streams and I really like Postgres. So I was observing what you're doing and it was still impressive that you managed to keep it alive. So that was amazing. like a primum non nocere, how the doctors are saying.
SPEAKER_00Okay, so Hazel, once again, thank you a lot for being a great guest today and sharing all that knowledge. I'm really impressed, especially that I felt that I'm a guest at some point that I'm a guest and you are the showrunner. But I enjoy it. So thank you. Thank you a lot from me and from the Architecture Weekly subscribers.
SPEAKER_01Absolutely. It was fun to be here and I was glad to do this with you. It was a lot of fun.
SPEAKER_00And if you're watching that, then below you will find all the links to the stuff we discussed and really follow what Hazel is writing and showing because it's really, not only in terms of observability, but also leadership, etc. I always enjoy the content. Okay, so thank you, Hazel. And yeah, leave us a comment below on what are your thoughts.
Welcome to the new week! “How to document systems build with Event-Driven Architecture?” and “How to keep our understanding about evolving messages definitions?” Are one of the common questions I’m being asked. For many...
Welcome to the new week! Tomasz Ducin is back with us to explain the next parts of Frontend Architecture - this time with a deeper, more hands-on walkthrough of Frontend State Management on the React Query example. And...
Welcome to the new week! For a long time, I’ve wanted to talk more about Frontend Architecture. In my projects, I always enjoyed delivering features end-to-end the most. That gave me the feeling of completing and...
"My favorite conspiracy theory is that the stuff we make in software actually has any sense. That's a big conspiracy, and you can see people believing that, and that's just not true. I mean, it is in some percentage,...
This time, our webinar has a special guest: Jarosław Pałka. He’s the Senior Staff Software Engineer responsible for benchmarking infrastructure in Neo4j. We discussed how to reason about performance practically, so how...