text stringlengths 0 2.35k |
|---|
I think one of our first customers at Rookout actually used Rookout at the time it was a Node application to debug a bug they'd been chasing for over six months. It was a super-complex bug, and they were doing OAuth three-sided authentications, and they got a cookie... And they actually had this error validation code t... |
**Tiago Queiroz:** Yeah, definitely watch out for your error logs. I think that's one of the most helpful things. But not just the logs themselves, but like graphed, good error messages. Don't just say "Hey, I broke" or \[unintelligible 00:22:31.07\] Try to give a context of why that thing failed. A simple thing. For e... |
So try to explain it, giving context why you're in that error path. Like Liran said, watch out for those error handling code; that's usually where lots of bugs and issues are gonna happen. Errors are not well handled, or even worse - they're handled, but they're just hidden, and then when you run the application on you... |
I actually have a good example. Recently, we had some PRs on our applications, like adding more logs, adding more context to this error log, because of something like "Oh, I cannot start because the log file already exists. So maybe there's another instance." But it didn't tell where the log file was located; it just s... |
\[23:54\] And then maybe if you go through lots and lots of logs, at the very beginning of the application it says "Oh, my configuration path here", and then you have to know that you need to join that with something else to find the log file. But why not just print together? Like, "Hey, log file, here's the whole full... |
So sometimes simple things like that can make the whole difference... So maybe found the recover all error I have to shut down, but here's the error, here's the situation. Try to show the code path that led to the error, to error handling, and give as much context on your error message as possible, so someone reading t... |
**Ian Lopshire:** So we've talked a lot about logging, and it sounds like for errors, logging is the way to go. Where do you think the place of stats are? Like stats, and counts, and histograms of latencies... Where does that sit in the debugging landscape? |
**Liran Haimovitch:** That's a tricky question... Metrics are -- well, they are one of the most complex and powerful ways to monitor software. You can get a lot done, especially if you're looking at large-scale systems, production systems and those sort of things. But you also need to have some basic understanding of h... |
Obviously, there are a few great places to start, that are always good - looking at your requests per second, looking at essentially how many requests your application is processing per second, looking at your latency, how long does it take you to process requests, looking at your error rates, how many requests are suc... |
Also, what dimensions do you look at those metrics? How do you break them down? Do you have multiple regions? Do you want to monitor it per regions? Do you have multiple endpoints? Do you want to monitor it per endpoint? The different endpoints have different tolerance for latency or for errors... And the list goes on ... |
So on the one hand, if you're looking to monitor an application in production, getting some metrics in there is a great start... But it's also a dual learning curve, both on learning how to use metrics in general, but also about learning what's normal and what's good versus what's bad for your specific application. |
**Tiago Queiroz:** Yeah, I think metrics are not -- I wouldn't call them exactly a debugging tool. They're more like to understand -- because metrics are aggregations, right? Usually, we get average requests per second, or average -- like, given a number of requests of instructions, of executions, in a given time, thos... |
\[27:45\] So usually, you cannot pinpoint one thing on that one transaction, and then get the metric and use those aggregations. But they also help you to maybe understand another thing, like which bugs are actually, let's say worth fighting right now. So if you have metrics like error rates, and you have like 50% of y... |
So definitely, I think metrics can help to prioritize, and definitely performance issues. So if you want to improve performance or you actually have performance issues, then those metrics will be there... Even though you can handle performance issues as bugs, when someone talks "Oh, there is a bug. Let's debug somethin... |
**Natalie Pistunovich:** We talked about good and bad practices of debugging, we talked about debugging in the cloud versus on-premise; we talked about stats versus errors, or logs. Let's talk about debugging in production versus not. Are you debugging in production? If yes, how? |
**Tiago Queiroz:** Yeah, I think in the case of working with Elastic, it's a very interesting case of debugging in production, because -- well, we don't have access to the users' environments. So basically, we're only relying on logs, and asking people "Hey, what have you done?" So that's where you actually see two thi... |
So yeah, I think definitely debugging in production has this facet of - sometimes you actually don't have access to the environment, and more often than not you're mostly relying on logs and metrics, and that's all you have. So you're basically, let's say, looking to the past. Okay, something happened, I have things th... |
**Natalie Pistunovich:** Then you can't really reproduce what the person who reported this has, because it's not like "Send me your code and I'll try to run this, see how that works..." |
**Tiago Queiroz:** Yeah, sometimes you just can't, or sometimes you do your best to get as close as possible... But yeah, that's a thing that reminds me of something - sometimes you can't have access to production or to the actual environment, but you can reproduce a close enough experiment, if you have enough informat... |
**Liran Haimovitch:** One of the fun things about being the CTO of Rookout is I not only get to see how our engineers debug in production, but I get to work with many of our customers while debugging in production. And many of our customers have - I wouldn't say given up, but come to realize that they need a better sol... |
\[31:51\] Monitoring tools were not meant for debugging. Monitoring tools are meant to show you something is wrong. Your application is down, you're having some issues with some of your endpoints, some of your users are not getting the best service... But they were never designed to pinpoint exactly what's going wrong,... |
Many of our customers have figured out that whether they're trying to make their engineers more productive, or solve customer issues faster, or both, they prefer to be able to truly debug in production. And we see a few considerations and hurdles in how you approach that. I mean, security is a big thing. You have to ma... |
And obviously, you have to think about performance and availability. Will the access and the tools I provide my engineers somehow impact the stability of my application? Will it impact the performance of my applications? |
Whenever you're thinking about debugging in production - and it doesn't matter if you're giving them some fancy tool such as Rookout, or providing them with SSH access to go do their thing - you need to think about the implications in those elements, especially how the non-functional requirements of your system, which ... |
Once in a full moon, I actually meet somebody who decides to attach a traditional debugger to production, because either the issue is bad enough that they have no choice and that's all they have to do, or because for some peculiar reason it doesn't disrupt their system all that bad, for some reason, and they can afford... |
**Ian Lopshire:** So I wanna go back to logging, just a little bit. I know we've talked about it a ton... But we mentioned earlier that sometimes there's not enough logs, sometimes there's way too many... Do you think log levels play a role in that? Is there something that we should use? In the Go community there's a l... |
**Tiago Queiroz:** I would say it depends. I've gravitated towards different opinions of like "We should only have one level" or "We should have multiple ones." I think it definitely depends on what kind of applications you are developing. If you deploy your own microservices on your infrastructure, then you have way m... |
\[36:03\] In some of the applications that we have - at Elastic we actually have even a different approach. We do have the log levels, but also we can filter specifically loggers, or different parts of the application \[unintelligible 00:36:15.17\] So we can say "Oh, I want log debugs from our inputs, or from our parse... |
So that's also an approach that I find quite interesting. It can be quite useful, especially when you have the situation of like -- logs are probably gonna be too verbose, some of them, but then you can filter out the verbose ones, not like even generate them, and then you focus on the things you actually need. |
**Liran Haimovitch:** So log levels are super-important. You can't do without them, at least if your system is any scale... Especially when it comes to how much traffic it's handling, because you're gonna have to cut logs somehow, and verbosity levels is the easiest way to get started with. Obviously, you can get fancy... |
But when thinking of log levels, one thing you have to keep in mind - when you're looking at most SaaS operations today, when the same team both builds and operates the software, log levels, especially in the long-term, tend to be gamed. |
I'll take an example... Let's say you're running the application for the first time; you're probably spewing debug logs. You have zero traffic, you're printing everything... You're just dying for somebody to bother to go to your website and whatnot... So why not - just print everything. Then, later on, the application ... |
Now, you might have pretty well-defined verbosity levels, you might not have those well-defined verbosity levels, but the next time some software engineer is gonna need some piece of log to troubleshoot something or get their job done, I can assure you the level of logs they're gonna use is gonna be a warning, and not ... |
Long story short, log levels are not gonna fix everything for you, but they can definitely help, to a certain degree. |
**Ian Lopshire:** I love that point about gaming the system, because I have definitely done that, without a doubt. |
**Liran Haimovitch:** We're recording this, you know... |
**Ian Lopshire:** Oh yeah, we'll make this error, because I need to see it. \[laughter\] I'll admit it all day. It's all good. |
**Tiago Queiroz:** \[39:58\] I totally agree with that. I think some logs are not that \[unintelligible 00:40:00.10\] because if something goes wrong, I need to know that happens, so I won't put that as debug. I know some people would call it debug; I'm calling it \[unintelligible 00:40:09.13\] because I want this log ... |
And I think it circles back to the thing - you really need to be careful, especially as you scale. I think Liran had that great point there - as you scale more and more and more, then the amount of logs become more of a thing, and then that's when you really need to think about what are you logging and how are you logg... |
**Natalie Pistunovich:** Last question and then we jump to the fun part of the unpopular opinion... When you have to debug something, how do you start? |
**Tiago Queiroz:** So I always start by trying to reproduce as close as possible the situation where the bug happened. Usually, we get "Okay, that think is failing..." Yeah, I try to reproduce it. It depends a lot on the situation, but yeah, I try to make the bug happen on my machine, if the logs that I have are not al... |
**Liran Haimovitch:** I think what I most often do is look at the code, especially if I have a descriptive bug \[unintelligible 00:42:35.18\] that kind of points me in the right direction. Quite often, if you look at the code with a fresh set of eyes, whether it's your code or somebody else's code, assuming you have a ... |
Other than that, debugging is a very associative process. I mean, if things get very, very messy, you can start doing a more standardized process, writing down everything you know, writing various \[unintelligible 00:43:43.11\] about what could possibly go wrong, and then starting to discuss how you can collect that ex... |
But early on in the process, I find that associative thinking leads to faster results in most of the cases... And that's another reason to look at the code, because once you kind of get a look of the code, get a sense of the lay of the land, then you're better positioned to look at additional data, whether it's logs, o... |
**Ian Lopshire:** Great. Alright, the next part of the show I think is everyone's favorite... Unpopular Opinions. I hope you guys came with one... |
**Jingle:** \[44:36\] to \[44:54\] |
**Ian Lopshire:** Alright, who wants to go first? |
**Liran Haimovitch:** I'll go... My unpopular opinion is about OpenTelemetry. I know OpenTelemetry is being touted as the one to vanquish them all, but I find it to be over-presumptuous in many cases, way too complex, and hardly that much of a benefit over structured logging, in most cases. Obviously, there are excepti... |
The rest of us mere mortals are better off not over-complicating our systems and not over-complicating our observability solutions. Simple is always better in engineering in general, and in software engineering in particular. Logs are awesome. They've been with us since the dawn of computer engineering. Metrics are pre... |
**Ian Lopshire:** I definitely resonate with it being a lot of boilerplate and overly complicated... We made a move to move to that and abandoned it, because... It's a lot. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.