# OpenTelemetry with Laïla Bougriâ

An episode of [.NET Rocks!](https://invisiblenetwork.ai/podcast/130068596), 7 Jun 2023, 51 min.

Audio: https://dts.podtrac.com/redirect.mp3/api.spreaker.com/download/episode/54133500/dotnetrocks_1849_opentelemetry.mp3

What can OpenTelemetry do for you? While at Techorama in Belgium, Carl and Richard talked to Laïla Bougriâ about her experiences with the open-source library that can help give you more insight into the behavior of your applications. Laïla talks about being able to instrument your applications from top-to-bottom, regardless of platforms or development stacks. The conversation digs into the differences between logging, tracing, and telemetry - and how each aspect adds value to understand what your applications are doing, and how you can make them better!

## Transcript

[0:01] How'd you like to listen to dot net Rocks with no ads? Easy?
[0:05] Become a patron for just five dollars a month. You get access to a
[0:09] private RSS feed where all the shows have no ads. Twenty dollars a month,
[0:14] we'll get you that and a special dot net Rocks patron mug. Sign
[0:18] up now at Patreon dot dot net rocks dot com. Hey there, this
[0:24] is Jeff Fritz, the Purple Blazer guy from Microsoft, letting you in on
[0:28] a little secret about my friend Carl Franklin. You know, the guy who
[0:32] started dot net Rocks, the first podcast about dot net in two thousand and
[0:37] two, The guy who's been teaching Blazer on YouTube since twenty twenty. Yeah,
[0:43] that Carl Franklin. Well, Carl's joined up with the folks from Code
[0:47] in a castle to teach a week long hands on Blazer class at Are you
[0:52] ready to get this? At a castle slash villa in Tuscany. It's sort
[0:58] of a luxury vacation. It's Blazer learning built in. Carl's calling it the
[1:03] Blazer Master Class. You'll learn Blazer from the ground up, finishing the week
[1:10] with the ability to build and deploy Blazer applications. Since the training happens for
[1:15] only four hours in the morning over six days, you can bring your significant
[1:19] other your partner with you and you should right This part of Italy is absolutely
[1:26] beautiful. There's so much to see and do and in. Larry and Marco
[1:30] from code In to Castle are organizing daily activities both at the castle and in
[1:34] the area. The castle is in the Marema, a less touristed region of
[1:40] Tuscany, offering both classic Tuscan hill country as well as easy access to the
[1:45] Etruscan Riviera. With sublime local food, wine and olive oil around every corner.
[1:52] Breakfast is included every day. There will be two communal dinners at the
[1:56] castle book ending the experience, and most other meals and all activities are included.
[2:01] And did I mention you'll learn Blazer in person from Carl Franklin Listen.
[2:07] Space is limited and for very good reason. This is quality training in a
[2:12] beautiful setting. Go to code Inacastle dot com slash Blazer twenty twenty three that's
[2:19] bla z O R two zero two three to take advantage of this amazing opportunity
[2:25] to join Carl in Tuscany for an unforgettable week of la dolce Vita while advancing
[2:31] your programming skills in this important new technology. After building software for a while,
[2:38] you know it's only a matter of time before you see an HTTP timeout
[2:43] or a database deadlock. In software, it's not a case of if things
[2:46] fail, but a case of when one mishap like this and valuable data is
[2:52] lost forever. And these failures occur all the time, but it doesn't have
[2:57] to be this way. Introducing n service bus, the ultimate tool to build
[3:00] robust and reliable systems that can handle failures gracefully, maintain high availability, and
[3:07] scale to meet growing demand. For more than fifteen years, end service bus
[3:12] has been trusted to run mission critical systems that must not go down or lose
[3:16] any data ever, and now you can try it for yourself. End service
[3:22] Bus integrates seamlessly with your dot net applications and could be hosted on premises or
[3:25] in the cloud. Say goodbye to loss data and system failures and say hello
[3:30] to a better, more reliable way of building distributed systems. Try end service
[3:35] bus today by heading over to go dot particular dot net slash dot net rocks
[3:40] and start building better systems with asynchronous messaging using end service bus Hey, Antwerp.
[4:00] It's dot Rock Holy crap, there must be fifty thousand people here.
[4:11] Yeah, who knew we were in a stadium? I know, right,
[4:13] we are in a state. We're actually in a movie theater, which is
[4:15] cool. It is cool. The last time we did a dot Net Rocks
[4:18] in a movie theater I think was in Sofia, Bulgaria. Oh yeah,
[4:23] do you remember that? Yeah, a few years that was dev reached every
[4:27] And the funny thing was the Bulgarians thought it would be funny if Richard and
[4:30] I announced the names of the winners, the Bulgarian winners of the swag at
[4:35] the end of the show, and that was funny for them, for them,
[4:43] Bulgarian names need to buy a bow Okay, it lacks where snudge and
[4:50] they were just laughing their butts off. That's you. Oh you were there?
[4:55] Okay, all right, well, uh it's we're glad to be here
[5:00] obviously. Yeah, last day of the show. Fun to do a live
[5:03] show. Yeah, it's a live show. We have some good stuff coming
[5:06] up here. Layla Bougria is here and we'll be talking to her in a
[5:11] minute. But first we have to do this little thing called better know a
[5:14] framework roll the crazy music. All right, buddy, what do you got?
[5:25] Well, I saw this come across Twitter. It's a tweet and while
[5:28] I'm linking to it, Boston Dynamics. You know who those crazy people are,
[5:32] the guys with the robots. They make the robots that dance, they
[5:35] do backflips. Now, yeah, a little parkour with robots and stuff.
[5:40] Yeah, they used to have a little uncanny heathered robots, robots that were
[5:44] tethered, and then they got gas powered robots. Now they're battery driven and
[5:47] they put out videos every once in a while of things that look like animals,
[5:51] like cougars and dogs. Well, anyway, they've put chat GPT into
[5:57] a robot and now you can talk to it and it will talk to you
[6:01] back. And so there's a tweet about that. It was from April,
[6:05] but I thought it was so cool and a little bit scary. But they're
[6:10] asking a questions like, you know, are you function It's like data,
[6:14] are you functioning within normal parameters? You know? And it would say,
[6:16] yes, you know, I have this blah blah blah. What my levels
[6:20] are? You know these kinds of things, my battery level? How many
[6:25] what did it say? How many interactions in your last mission, and it
[6:30] will tell you about its last mission and where it went. Just as they
[6:33] used the word mission, I don't even know if it was mission, but
[6:38] that an extermination mission. It could have been just wondering. It's pretty scary,
[6:42] but it's cool. That's awesome. So that's what I got it.
[6:45] It's a tweet with a video. Okay, yeah, Boston Dynamis videos are
[6:48] always amazing, fun. Good one who's talking to us? Richard grabbed a
[6:51] comment off a show seventeen fifty three. That's the one we did with Mika
[6:57] about Visual Studio twenty twenty two productivity back in August last year, and Mark
[7:02] Wansel had this great comment. Mark has a lot of great common spells,
[7:05] and he says one of the things that Mika noted a few times was telemetry.
[7:11] I think that this would be an interesting show topic. There's a popular
[7:14] GitHub project called open telemetry that might be a good starting space. There seems
[7:17] to be an art of telemetry. What to collect, how much, performance
[7:20] considerations and primacy considerations. Check out open telemetry dot io. What do you
[7:26] think that that's not a good idea? Not want to do that? Noah,
[7:30] we won't do that show. Yeah, sorry, Mark, I wish
[7:32] we could help you, but we can't help you. Yeah, but I
[7:34] will send you a copy of music Cobi And if you'd like copy of music
[7:38] by I read a comment on the website at dot net rocks dot com or
[7:41] on the facebooks. We publish every show there, and if you comment there
[7:43] and ever reading on the show, we'll say, do you a copy of
[7:45] music by? And you should follow us on Twitter. But the real fun
[7:48] happens on Mastodon. I'm Masodon, I'm at Carl Franklin at tech Hubs Social,
[7:54] and I'm Rich Campbell at masodonda Social. Send us a two let us
[7:58] know you're listening, and that brings us to our show on open telemetry.
[8:03] What yeah, how sorry, that's the topic. Lila Bougrie is here.
[8:07] She's a software engineer with over fifteen years of experience in the dot net space
[8:11] and currently works in particular software where they build nd service bus. Maybe use
[8:16] it maybe forard a bit, certainly don't know the show a few times.
[8:18] Yeah, She's a Microsoft MVP and frequent speaker conferences and interspare time. She
[8:24] loves to knit and crochet. Welcome, thank you. How about Lila,
[8:28] huh, we were lying when we said we weren't going to do a show
[8:35] about open telemetry. That's kind of why we read that. Yeah, yeah,
[8:39] I figured if I've got a comment literally somebody asked her for to open
[8:41] telemetry, now is the time to read it. So, Lila, what's
[8:43] the elevator pitch for open telemetry? Well, the elevator pitch. So we've
[8:52] we've had multiple telemetry signals in software for years, right, the oldest one
[8:58] being logs. I think we all know logs. We've also mostly used metrics.
[9:03] Maybe I guess distributed tracing is a newest signal, but I would say
[9:07] that the elevator pitch for open telemetry is really correlating them all together. And
[9:13] that's what makes it really interesting for me at least, because you know,
[9:18] each signal has its own value. And we've also been logging for years,
[9:22] and even though we can see, like you know, tracing might be the
[9:24] better option today, but then we still have all of those logs we don't
[9:28] want to go rewrite and higher applications though. We do have log providers so
[9:33] you can plug in however you want to do your logging, but that's not
[9:37] really that's taking the same source and putting it in different places, isn't it.
[9:41] You're talking about ingesting different sources into one place exactly, Yeah, and
[9:46] then being able to connect it. So basically, imagine, you know,
[9:52] over the rainbow that you get lowered and there's a metric that looks out of
[9:58] whack, and it's like, okay, something is up. What is up?
[10:01] I don't know, just the metric is out of whack. So you
[10:05] have to go figure out how to do that, and that's usually a challenge
[10:09] because you then have to go figure out, Okay, how do I connect
[10:13] that to those other signals that I have. But what if you could look
[10:16] at the metric and say, okay, I can see that it's correlated to
[10:20] these traces, and then go look at that, and then the traces would
[10:24] also be connected to the logs and you would be able to basically, yeah,
[10:28] paint that entire picture of what's going on, and you wouldn't be losing
[10:33] all of that time doing that thing. Manually sounds like a Wikipedia rabbit hole,
[10:37] right. One thing leads you to another to another. So I'm trying
[10:41] to distinguish between all these different things. I mean, logging means a particular
[10:46] product like sequel server spitting out logs about how it's functioning, possibly versus metrics
[10:54] being more things like the state of a server, like the hard drives pinned
[10:58] or running low memory. And then when I think about traces, I think
[11:03] about there's tools that specifically are about following a button click from the client to
[11:09] the server to the database and back again. Right. Yeah, I like
[11:15] to think of that like following a business transaction, right, right, like
[11:18] the workflow. Right. So it's true, Yeah, that's definitely true.
[11:22] But at the same time, we've also been logging in our applications a lot,
[11:26] and that's still then connects together. This is as a developer writing code
[11:31] to push messages onto a log right, So that's usually I'm a developer,
[11:37] right, So I'm always looking at things from the application perspective, and how
[11:43] do I make this application observable? And there's multiple signals, and you would
[11:46] choose each individual signal based on whatever your scenario is. It could even be
[11:52] that for a specific scenario you might come to the conclusion that using multiple signals
[11:58] might be useful. So for example, let's say that a failure occurs,
[12:03] right, you want to keep track of that and have a trace that reflects
[12:07] that failure. But you might also want to have that reflected emetrics so you
[12:11] can do the alert de alerting and all of that. Yeah, So that
[12:16] meaning to trip it up in through the system means to say there was a
[12:18] failure that occurred as well as what shows up in the law. Right now,
[12:22] there's a lot of third party products out there that do telemetry. Or
[12:28] does open Telemetry allow you to use those as sources and then pull them together,
[12:33] or does open Telemetry have its own things that you can plug in or
[12:37] both? It's both, and that's a good part because I think if we
[12:41] look at our applications and we want to make them observable, there's a lot
[12:46] that we can do. But I think with the Open Telemetry project, and
[12:50] also like all of the effort that the entire community has basically put into this,
[12:56] they've made it easy for us, right because you could basically say what
[13:00] second are using, Oh, I'm using a speed on at core and I'm
[13:03] using the Azure is thek whatever it is, right, and you could just
[13:07] use those instrumentation libraries that are available from those frameworks. It could be built
[13:13] into the framework or could be a dedicated package and you can turn them on
[13:18] and just by doing that, you're already collecting a bunch of information, and
[13:22] specifically in the distributed system, it's usually going to give you insight into that
[13:26] interservice communication where we have the blind gaps. So it already like gives you
[13:33] a lot of information. So the cool thing is that you can then intercept
[13:37] basically those traces that are being generated by those libraries, and in that that
[13:43] I would be calling activity. It occurred, right, and you could add
[13:46] you could create your own activities, which is, by by the way,
[13:50] the sort of same thing as a span. But yeah, they basically what
[13:56] they did is the activity API already existed, and instead of creating a completely
[14:01] new API to match the naming of the open telum Try specification, they just
[14:05] implemented the specification inside the activity API. So that's why the name is a
[14:09] little bit different. But basically, what you could do is take the current
[14:13] activity, which could be omitted by an instrumentation library, and say, I
[14:16] want to add some information to this that is specific to my application, to
[14:22] the workflow I'm running in so that I can get even more insight. What's
[14:26] the voodoo that allows us to go between the different tiers and an app and
[14:31] say these are all part of the same transaction. Right, that's basically a
[14:35] propagation mechanism really, because if you think if a trace, it's basically a
[14:41] bunch of spans that are connected to each other. Now, what happens is
[14:46] at the beginning of the trace, we basically get a trace ID assigned and
[14:50] that's going to be carried across all of the spens and then each span has
[14:56] a unique ID. Now, in order for that information to propagate across multiple
[15:01] services, we need a propagation mechanism. And there's multiple protocols that are basically
[15:07] supported by the Open Telemetry Project, of most of well known. One is
[15:09] a W three C trace context for HTP headers always feel like I need a
[15:15] breath, yeah, And then there's another one for gRPC. So it depends
[15:22] on what you're doing there. So I have, for example, and as
[15:26] your web app, right, I have Application Insights turned on, I've got
[15:31] all the switches lit up, and do I need open telemetry at that point?
[15:35] What's it kind of give me over what Azure Insights already has. So
[15:39] the way that I look at that is what Application Insights provides you is also
[15:46] sort of known as black box instrumentation, so it's basically independent of your specific
[15:52] application code. Yeah, but obviously the things that we are doing in our
[15:58] code is usually the interesting bits, and sometimes we need a little bit more
[16:03] insight to understand, you know, what pieces of code are we executing there,
[16:07] what are we doing, what is like the cause of latency or whatever
[16:11] it is, what pieces slow? Application Insights doesn't provide that well. I
[16:15] think it's it's quite different to to compare because at least to my to my
[16:22] understanding, it's more of an overall view that you get, and you can
[16:26] still use the Application Insights as AK directly and still emit like application specific telemetry.
[16:33] But but then you're tied, right, You're tied to the vendor,
[16:37] right, and the thing is right right exactly, and if you don't want
[16:41] to change to another vendor, you're have that vanderlock. It's the point,
[16:45] right, Yeah, So if you use open telemetry, then you you could
[16:49] just wire up a different exporter. I mean that would also app Insights has
[16:53] good features for dot net specific absolutely, Yeah, if you've got some other
[16:57] code written in other things that aren't ornet related, yeah, happid sence is
[17:00] only going to do so much for you and certainly not going to work if
[17:03] you're in a container on AWS, is it. Yeah? So, I
[17:07] mean it certainly opens the door to working with more platforms, even more places
[17:12] and open hey, hey, there's a concept for you. Yeah, and
[17:17] it being available cross platform and cross front time as well. Like there's implementations
[17:22] for instrumentation libraries in many languages for many framework So that's really cool, especially
[17:27] if you think of like multi stack applications. Right. Sure, if I've
[17:30] got a group of Python developers going to build a data importer for me,
[17:34] the fact that I can instrument it the same way as everything I've gotten built
[17:37] and dot net, that's pretty compelling, right, and bring everything under one
[17:41] roof and measured the same way. I mean, that's the real problem is
[17:45] that often we're chasing problems that transition between different systems, and because they're measured
[17:51] differently, it's very hard to associate restuff together. I'm just thinking in terms
[17:55] of how much code I need to write as a developer to take advantage of
[17:57] all this and how much of it comes of the box. Well, that's
[18:00] what I That's why I mentioned the instrumentation libraries, right, and even if
[18:06] you know things like event counters and stuff like that, even that has dedicated
[18:11] libraries available already, so you can basically just turn them on and like I
[18:15] said, you could plug into that and add to that information information. So
[18:22] usually what I say is, look at what it already gives you. Turn
[18:25] on the instrumentation library. Yeah exactly, don't reinvent the library. So look
[18:30] at what's out there. Turn it on and see what it emits, and
[18:33] take a look at what type of insight that already gives you, and it
[18:37] probably is picked up by open telebras you're just fine. Yeah, yeah,
[18:40] Well, for example, let's say that you have aspe core instrumentation enabled,
[18:45] right, so you're going to see the request, but you don't get a
[18:48] lot of insight into the request. But I mean it has hooks that you
[18:52] could then plug in additional information and expose whatever is you know, interesting to
[18:59] you in that scenario, so that you could understand like the sort of business
[19:03] context of what's going on. And that's what makes it really powerful. I
[19:07] spend enough time on the firefighting side of being assisted min where there's stuff's being
[19:11] spewed out in the logs that we're looking at. We just don't know what
[19:15] it means, right, right, like anything there? Yeah, it's clear.
[19:18] It's like your own little Internet. Everything you need to know is there,
[19:22] you just can't find it. Yeah, So you know, how do
[19:25] you add the additional information that helps someone see? This is where we're having
[19:30] right. That's where defenders really come in, right, because they are then
[19:34] going to offer capabilities that allow you to querry, to analyze that information,
[19:41] and to basically get to actionable insights, because that's the whole point of telemetry.
[19:45] Right. That's a bunch of data, But then what do I do
[19:47] with it? Right? So you want to basically have tools that help you
[19:52] get pointers on how do I fix this problem or how do I improve this
[19:56] latency issue that I'm seeing, or maybe even see like which feature gets used
[20:03] a lot? And things like that. She is almost more of a profiling
[20:06] thing, right, Like what are the functions are we called the most often?
[20:08] And we know perfectly well why the system is slow. It's the database
[20:11] is fault. We just blame the DBA. Then we're done. Life is
[20:17] good, all right. You know Another one that I always think of is
[20:22] because I'm you know, I'm like an observability enthusiast, I would say,
[20:30] right. And the reason why I'm so enthusiastic about it is because, well,
[20:36] my sort of core focus has been message based systems for two years are
[20:41] to trust. Shoot, yeah, it's just clim messages split across Q and
[20:47] then you get out of order messages and it's like, what's going on?
[20:49] Why am I seeing this fail? And especially in a message based system,
[20:55] usually the problem is happening like for the up stream right, right, So
[20:59] how do you get to that? Right? So? And how do you
[21:03] connect at even outside of the messages that are being sent, because it has
[21:07] to maybe connect back to, like you said, a click somewhere on a
[21:10] user interface. So being able to have that full visibility across all of the
[21:15] subsystems is really really powerful. Yeah, and again I'm still worrying this a
[21:18] lot of codforma, right, But you're telling me that when when you're using
[21:22] a library that has protocol understanding, it's going to insert a lot of that
[21:26] information automatically for us. So it's selfol together. Yes, Yeah, And
[21:30] because of the sort of nature of how distributed tracing works, that information is
[21:36] going to be connected together through that same trace idea that's basically being propagated does
[21:41] have substantial overhead. Is there is there any reason to only turn it on
[21:45] when you have a problem or can you leave it on all the time?
[21:48] Okay, that's that that's going to be a long question. As you can
[21:53] you can go for the It dependspends definitely. So yeah, it definitely depends.
[22:00] But so usually what I tend to say is make sure that what you're
[22:04] collecting is useful, right start there, because if you just turn I don't
[22:11] know, every instrumentational library on the planet on, we log all the things
[22:15] and capture all of the traces and all of that, you're going to have
[22:19] to sift through that all of that information to be able to understand like what's
[22:23] going on. Right, So it's also not a thing of oh, look
[22:27] at all of these instrumentation libraries and then turning everything on, because you're going
[22:30] to be incredibly overwhelmed, to the point that as a developer you might feel
[22:36] like, okay, this is not useful. Yeah, let's just turn it
[22:38] all back off. I mean, I've also had the problem where I've said,
[22:41] Okay, I'm not going to measure this thing, and then I never
[22:44] get data for that thing, Like it turns out I'm looking for the wrong
[22:47] in the wrong place. Like that's not a number that moves. So some
[22:51] of these telemetry products that are out there have ways that they can work on
[22:56] a background thread or they can attach as a sidecar, you know. So
[23:03] do you have those kinds of things where you can sort of stay out of
[23:07] the way so if there is something that takes up some more time, it
[23:11] can happen on a background thread. Yeah. So that's where the open telemetry
[23:15] project is also really interesting because if let's say that you look at the basic
[23:18] samples that are out there for dot net right, what you're going to see
[23:22] there is that you can basically, in a service enable open telemetry at an
[23:26] exporter, which means that you're collecting let's say, for the sake of the
[23:30] example traces and sending them directly to an observability back end. Basically what that
[23:36] could be as your application Insights or Jager or Honeygo, whatever it is.
[23:41] So, but the thing is is that there's many problems to that. First
[23:47] of all, like you said, there is overhead for that service because it
[23:49] has to collect all of that information. There might even be some processing behind
[23:55] the scenes happening as well. We had a service bus, well, well
[24:00] that's we'll get to that. It will get to that, yeah, and
[24:03] then you have to export it. But then imagine that the observability back end
[24:07] is not available for a few seconds because it's you know, it's the network.
[24:12] It's the network. Yeah right, so well no, that's usually that's
[24:21] handled by the libraries themselves, but it is adding that pressure to the services
[24:27] telemetry, right, yeah, you don't want to have that disconnected information and
[24:32] then looking at half of the story, right, But there are ways to
[24:34] solve this, and that's where the open telemetry collector comes in. And then
[24:38] you have multiple deployment options on how to run that. The first one is,
[24:42] like you said, a sidecar, So basically you're going to have a
[24:45] sidecar for each service that you're instrumenting, and then immediately you're offloading all of
[24:51] the telemetry. Well, you're collecting it and sending it through to the sidecar.
[24:56] But there are any processing that needs to be done, like redacting information
[25:00] because remember sensitive information, you don't want that you're in all of that telemetry
[25:04] you're collecting. So that's just down the road. We can be fined very
[25:10] easily. I call that digital white out. So then you have all of
[25:14] that processing and then you could export it then to the observability back end and
[25:18] you'd be able to handle all those communication issues and all of that in the
[25:22] side car and your service is not affected. Now that's one option, but
[25:27] you could also set up the open telemetry collector as as at the gateway,
[25:33] so it's a central components and all of the services can basically send their telemetry
[25:37] information to that central component, which then will take care of processing all of
[25:42] that information to the to the back Yeah, and it could batch that information
[25:48] and it's a pretty powerful thing, and you could even let go crazy or
[25:52] if you need it right, but you could have a sort of hybrid model
[25:56] in which you have a sidecar per service which then sending their reformation to the
[26:00] central collectors. Is there anything special in the storage on that and there's just
[26:06] blobs or text files or are they actually using a database on that? Well?
[26:10] I think it depends on the signal, sure, because usually metrics go
[26:15] to time serious databases and then logs. Honestly, I don't know. It's
[26:22] a good question, depends but it depends. Yeah. But well, actually
[26:26] about those time series databases. That's a sort of interesting topic on its own
[26:32] because at the beginning I was talking about TELME tree correlation, right, and
[26:37] basically adding the trace ID to the metric, just called them exemplar in open
[26:42] CELM tree naming, so that you would be able to connect that together,
[26:48] so you'd see a spike in the metric and see, oh, that's caused
[26:49] by those traces. Right now, the thing is that you have to be
[26:55] aware of what's known as cardinality explosion. So I'll try to when a bomb
[27:02] goes off in the Vatican. Dude, but did I say that. I'm
[27:06] sorry, those are cardinal explosions, not the same cardinality explosion. Cardinality explosion.
[27:14] I'll try to explain that, but usually I do this visually, so
[27:17] okay, I'll give me a bit to try. But think of the exemplars
[27:21] basically a label, right that you're adding to a metric, and that's going
[27:25] to give you some insights on the context in which that metric is being collected.
[27:30] So let's say that I have a metric called failure rate, because I
[27:34] want insight into that and to have a little bit more background information. I
[27:40] want to know which environment that that happened, bill, development, tests,
[27:44] production, whatever it is. And I also want to know which hp status
[27:48] coode came back. Now that HSP status coode in a production environment is going
[27:52] to have like for the sake of the example, thirty possible values. And
[27:57] we have three different environments. So that's three possible values for that environment label.
[28:03] Now the cardinality is basically all of the possible combinations of those values of
[28:12] every label that you add that is a cardinality. So it's a multiplier exactly.
[28:18] So we're fine with the environment and then having the HTP statoscope and then
[28:23] I add customer ID. Oh boy, so why let you do that?
[28:29] We're like one hundred combinations, and then you threw in twenty thousand customers a
[28:32] ruined everything more. Yeah, how do thousand customers a million customers? Somebody
[28:36] would ever do vouch? And that's how we then basically get cardinality explosion because
[28:41] what happens in the time series database is that every time you have a sort
[28:45] of unique combination and your series is created, so your cost goes up right
[28:51] and it becomes really hard to quire that information. So it's also important to
[28:55] one field, which just one field. If you just don't do that,
[29:00] there won't be this problem. Yeah, well it seems like a good idea
[29:04] when you do it right until cardinalities exactly. So it's also important to be
[29:10] aware of, you know, what observability back end are you using and how
[29:14] does that work, because there are some tools out there that do support high
[29:18] cardinality. So it's just something that you have to be aware of. Yeah,
[29:22] and so you can tolerate if you really come to the resolution you have
[29:25] to do that one way or the other. I mean, custerrity doesn't seem
[29:29] that crazy because it is useful if you've got a customer on a phone to
[29:33] say, hey, I could pull all the transactions, all of those streams
[29:37] for all of that customer and sort of look at where they were having problems.
[29:41] Yep. That's like full production debugability, right, yeah, without doubt.
[29:48] And with that, I've got to interrupt for one moment for this very
[29:49] important message too, and we're back. It's dotting at Rocks. I'm Richard
[29:57] Campbell, that's Carl Franklin. Hey, Hey, talking to our friend Leila
[30:02] about open telemetry. Hey hey, and we've kind of gotten to that place
[30:06] now, right, Like we we how do we visualize this because you're getting
[30:11] you're probably it a lot of information like what is are the tooling that comes
[30:15] with it? Or I have to write my own what are the dashboards?
[30:18] Well, that's hopefully where you choose a vendor, right, and then you
[30:23] know, with the abilities of open telemetry, by standardizing all of that information,
[30:27] I usually just say, like, try a bunch out. You see
[30:30] what are the requirements for choices? You imagine you can just look these up
[30:37] to standard graph controls and things like that from your various vendors. If you
[30:41] want a dashboard, yeah, yeah, yeah, there's just so many options,
[30:45] and I feel like each of them has their own strength. But yeah,
[30:52] for example, if you're if you're running in the Azure stack then and
[30:55] you're already using application insights, it's a thing you know, can it makes
[30:59] sense against and you're using that as well. Yeah, But then for example,
[31:03] I've played around with Honeycomb, and I think that they're especially like the
[31:07] collaboration that they've built into the tool is really cool as well as AWS product.
[31:14] No, no, it's its own company, Honeycomb. Okay, big
[31:17] big taste and a big big bike. Nice. That's the breakfast Cereal.
[31:21] But okay, I was a kid of the you know what I'm thinking.
[31:23] I'm thinking of that there is a honey Honey something product in AWSS, no
[31:27] code product, yeah, okay, different one, but yeah, Honeycomb is
[31:32] an instrumentation library. Yeah. So, and they're very invested in open telemetry
[31:37] as well, and I think it's one of those tools that supports high cardinality.
[31:41] They talk about it a lot as well, right, yeah, but
[31:44] yeah, it would sit out to me. There's really the sort of collaborative
[31:48] feature features that they had, because usually if you're looking at a huge problem,
[31:52] you're not doing that by yourselves, right, yeah, you know,
[31:55] and if it's like if you if you have a twenty four seventeen and one
[32:00] and stair shift, you want to be able to hand over where you left
[32:01] off things like that. Yeah, I'm wondering about So who is this Typically
[32:07] the systems that are going to get these packages in the first place, that
[32:08] that's where the air resh is first show up, where the problems appear,
[32:14] and then they might be passing it to development saying hey, we're looking at
[32:16] this and we think it's it's this kind of problem. Well that's where I'm
[32:22] also expecting some evolution because yes, usually now it would be a different team
[32:29] when they would be looking at something that looks funny, yeah right, and
[32:32] then get some understanding, hopefully some actionable insights, right, and then being
[32:38] able to bring that back to the development team. But it's it's really interesting
[32:44] to me in the sense that we're the developers, We are the ones going
[32:49] to be writing that application specific telemetry. So it's it's also really important to
[32:55] get like organization wide alignment as well on the type of telemetry that you're going
[33:02] to be collecting. So this seems like there's an infinite number of decisions to
[33:07] make here, right, I mean you just by using open telemetry, that's
[33:10] just one step of many. Yeah, what are we going to be looking
[33:15] at how what's the granularity of it, How are we going to query it,
[33:19] how are we going to look at it visually? Like, these are
[33:22] all things that aren't just in the box. You have to think them through.
[33:24] Yeah. Well, usually what I try to give a world try to
[33:30] advise as well, is that to sort of documents and guidelines like what are
[33:35] you looking for with your telemetry? What are the problems that you're trying to
[33:38] solve and like come up with a specific set of questions that you could as
[33:45] a developer when you write a feature, ask yourself so that you could add
[33:51] the telemetry that is going to answer those questions. Right, I mean,
[33:53] what if you don't know what you don't know? What if you don't know
[33:57] what you want to look for as a guidance? Are right to say?
[34:00] Yeah? Some of this sounds like business related decisions, like we sell widgets,
[34:05] and I want to know when a sale fails because of technology rather than
[34:07] the customer didn't want to buy it, right, yeah, definitely, or
[34:12] simple things like this page took too long to render or whatever. Yeah.
[34:15] Yeah. And then from the sort of failure perspective, I usually try to
[34:21] look at the code and think to myself, if something were failing here,
[34:24] what I would be What would I be looking at if I were debugging this,
[34:29] like, what what state would be interesting to me? What variables would
[34:32] I be looking at? Have I captured the input enough? Have I captured
[34:37] what's going out to be able to understand and be able to then you know,
[34:42] go back and try to understand what happened from the outside. Right,
[34:45] there's an easy solution all of this you just put all your code in a
[34:49] try with an empty catch. No problem is that on error resumed next a
[34:53] sort of yeah, it's more like slash day to turn off all the debuggs.
[34:59] I don't want to know. Just keep getting don't tell me about these
[35:01] guys. I mean a lot of this we've talked about very proactively, like
[35:06] we're going to detect the errors before the customer does or before the customer complaint.
[35:09] Yeah. I think there's another dynamic where the customer is complaining and we're
[35:14] getting a ticket that's like what error. I think it'd be very challenging to
[35:19] say, you've got this ticket is about this customer, it was roughly at
[35:22] this time, and now you want to go dig through the logs to say,
[35:24] can we see what this person's complained about. To do is to have
[35:28] the customer on the phone and enable this sort of thing, but just for
[35:31] them, just for their customer ID and say and then just watch it as
[35:37] they're going through the process where it fails and now you've got something. But
[35:40] is that impossible? Well? I think so, but it sort of depends
[35:45] on what type of sampling strategies that you're applying. And also, like you
[35:50] know the type of observability that you're collecting, because let's say that if you
[35:53] want full insight, so basically any error that occurs to any user, right,
[36:00] be able to say, oh, you know that was since we're an
[36:02] antwer that was Shalts and it was three pm on a Friday, and basically
[36:08] be able to find that request and look at what were they doing, because
[36:13] the thing is that users when they open tickets or whatever it is, the
[36:16] thing is that they weren't paying attention to doing their usual thing, right.
[36:22] They didn't set down See, let's cause an error, and I'm not thinking
[36:24] about every step that I did so I could be able to explain it to
[36:29] you later. I usually get it doesn't work. What can you be more
[36:32] explicit? It doesn't work? Right, So then being able to connect that
[36:38] information back and say, oh, yeah, that was shuts right, and
[36:43] then find that, you know, Tracey's locks metric whatever was connected to that
[36:46] information. It's like being able to debug in production. Really yeah, And
[36:52] then we think you just described like turning up a lot of data there too,
[36:57] Like that's also you know, we were also warning not to do that
[37:00] because you're getting buried in minutia yea, yep. That's where the sampling strategies
[37:05] commits. Sure, and there's different ways to go about that. So if
[37:10] you think about traces specifically, you basically can choose between head and tail sampling
[37:16] and head sampling and dare You're basically going to decide whether to sample the trace
[37:22] at the beginning. So let's say when the business transaction starts, right,
[37:25] they're going to immediately make the decision of I'm keeping this or I just don't
[37:29] care about it. Right. Usually that's the most unbiased type of sampling as
[37:34] well quick order. Right. The thing is what if something fails, right,
[37:40] you don't know that upfront, What if this request was super slow.
[37:45] It's not something that you can know up front, so you could be losing
[37:50] a lot of insightful information. Sure, and that's where you get, you
[37:53] know, the tail based approach where you're basically going to collect everything so the
[38:00] entire trace across all of the services that it goes through, and at the
[38:05] end make the decision of is this an interesting trace? Do I want to
[38:08] keep it? So? For example, does it carry some specific attributes that
[38:12] I care about? Or was it slow? Yeah? And banks, the
[38:15] question can you turn these things on and off in production without restarting. Right.
[38:19] So that's where it becomes important again how you deployed this, right,
[38:23] because if you have a sort of direct export and it's really tricky, but
[38:29] if if you had it deployed as a side card, and it could be
[38:31] a thing of changing the configuration of the side card, like tailbase says,
[38:36] I'm going to assess the finish transactions, right, there's nothing special about this,
[38:39] throw it out right. Oh, this one had an unusual value,
[38:43] it took too long, it generated this air. So forth, I'm going
[38:45] to keep this one. And so that way you're sort of sculling as you
[38:50] complete exactly. That's pretty cool. Yeah, there's a cost that comes with
[38:52] that, sure, because basically you're collecting everything, so you've got those overhead
[38:57] on the workload. Although hopefully synchronous to some degree. Actually that asynchronicsy brings
[39:01] some dishing point that you wanted to have the customer on the phone while you
[39:05] work them through it, like that one scenario. How much latency do we
[39:07] have when we're doing all that processing separately, Like how soon can we see
[39:10] data from when it tries actionized? You happen, right, that's again another
[39:15] concern that you have to basically be focused though, right, like what is
[39:21] what type of latency are you willing to accept? And then it becomes a
[39:25] thing of being very mindful of what type of processing that you're doing there,
[39:29] because obviously all of that telemetry is going to have to go through that pipeline
[39:32] of processors, so you have to be very mindful of that. And then
[39:37] you have to get it out as soon as you can so that you can
[39:39] see it as quickly as you can and you can create as quickly as you
[39:44] can. But we're still talking seconds, aren't we really? Yeah, I
[39:49] hope even less milliseconds. That's been my usual experiences with asynchronous and telemetry.
[39:54] It's only slightly behind it, but it's not holding the transaction while it finished,
[40:00] you know that. That to me, the big sin here is don't
[40:02] delay the customer. Get they get the working transaction done. All telemetry can
[40:07] happen later, even though that later is a few milliseconds, right, That's
[40:12] why you offload. That's an our components again, Yeah, safer, safer
[40:15] to work that way anyway, which you don't want as a transaction field because
[40:19] you were measuring it exactly exactly that's dumb, that's no no. Yeah,
[40:23] so yeah, definitely quantum. I just got it, just like that,
[40:30] boom, it all makes it just makes sense, even though it still don't
[40:32] understand quantum. I'll leave that to you and sip, okay, we'll work
[40:36] We'll keep working on that problem. Yeah, that's definitely something to keep in
[40:39] mind is that, you know, instrumentation is at the end of the day,
[40:44] nice to have. It's not a mission critical component, so have to
[40:47] be very mindful of of how you do that. So one of the biggest
[40:52] mistakes that customers are people using the open til I'm train make when they first
[40:58] started. The biggest mistake, well, I turned everything on. Of course
[41:00] you did. I do that too. I like all the knobs, turn
[41:05] on all the knobs and then yeah, another thing was just figuring out what
[41:10] do I really mean? Right, So it's really understanding what your requirement is,
[41:16] because if you're saying I want to be able to debug any user request
[41:22] that happens in the system and have full visibility into that as opposed to for
[41:28] example, I walked into a project it's massive, there's zero documentation, and
[41:35] all of the people that worked on it, they're gone, right, and
[41:37] there's no instrumentation. Yeah, at that point, what you would like to
[41:42] have observability wise, it's just insight into how does this thing work? Yeah?
[41:46] Just follow a transaction, right, you know, have one end to
[41:51] end trace once and you'll have made a lot of progress. Yes, Now,
[41:54] the amount of telemetry that you need for those two things, it's completely
[41:58] the opposite, right, it's like one percent versus one hundred. So it's
[42:02] definitely still for me as well a learning experience. I mean, this is
[42:07] still pretty new and we're basically just adjusting to see still how the project is
[42:12] evolving. Yeah, because I mean many parts of the specification are stable by
[42:16] now, but a lot of things are still evolving. Yeah. Another thing
[42:21] that keeps coming up is sort of the three pillars of observability being you know,
[42:25] traces, metrics, and logs, And I wonder, but what if
[42:29] a first one comes along that might just happen. I can't think of a
[42:32] fourth one, right, neither find us pretty well. Yeah, when when
[42:37] the only thing we had was logs, could we think of metrics and traces?
[42:40] I guess that's true. Yeah, we started dreaming about them. It's
[42:44] like I'm trying to I've had that experience of I have the log from this
[42:46] machine, the log from this machine, now try and line those entries up.
[42:51] Would quantum computing introduce a fourth pillar? I think it would introduce to
[42:54] the sixteenth pillars, or two to the two hundred and thirty seconds parallel there.
[43:00] I also like this idea of knowing it failed before the customer does have
[43:02] failed. You know, you get what I'm hoping to, this tail loog
[43:06] thing of I see these numbers as insufficient. In some way, it kicks
[43:09] up into a system where someone can look at it and perhaps even call a
[43:13] customer and say, hey, we noticed, can we help you with You
[43:17] know, it's not just you're waiting for the for the people to complain or
[43:21] if it has to be on fire. I have never gotten a message or
[43:23] an email like that from a company that I and if I if that happened
[43:28] to me, I would be like really impressed. So I'm on a website,
[43:31] for example, and it screws up, and then I immediately get an
[43:35] email that says, hey, we noticed you had this problem, didn't work.
[43:37] Here's a solution. M Wow, that would be amazed. I ever
[43:43] see that is like a credit card when I'm traveling, yeah where every so
[43:45] often I use the card and a minute or so later the phone rings and
[43:50] it's hey, are you in Belgium? Right, yep, yep, I'm
[43:53] in Belgium. Okay, that's good. Then thanks, And then you're like,
[43:57] that's pretty cool. It turns out that was Bob from New Jersey.
[44:00] Just just want to know that happens to me all the time. I asked
[44:06] you about how service bus or you know, service buses and service bus plays
[44:09] into this. Obviously, this is what you do for your job. How
[44:14] does using a messaging system figure into open telemetry. Well, like I said
[44:21] earlier, right, um, building a message based system is is really nice.
[44:25] Well, you know, if you take into account the entire problem space.
[44:30] But one of the things you can go around around, basically is how
[44:32] hard it becomes the troubleshoot things in that type of system. Now, with
[44:37] the platform that we're building at particular, we don't only have in service bus
[44:42] as a middleware framework, but we also have a bunch of tools. Now
[44:45] service Insite specifically is basically already that sort of black box instrumentation. It's like
[44:52] you don't need to do anything, you just need to configure that you want
[44:58] basically those platform tools to be enabled, and it already gives you insight into
[45:04] all of the messages that are being sent around in the system, and you
[45:08] can see that in a production environment and understand which exact flow and where that
[45:14] come from and which message led to which message. So we've really been doing
[45:20] observability for years. Yeah, that's the thing. Well, because of the
[45:22] asyncrency and out of orderness, like you can't count on timestamps, you really
[45:28] need to have some kind of attribute flag to be able to know the related
[45:32] Yeah, those are things that we capture in the message headers, so we
[45:35] can basically know which message LEDs to which other messages, So that that's really
[45:40] cool. But the thing that we could never solve, and that's the sort
[45:45] of gap that opens telemetry closes, is having that visibility system wise, so
[45:51] connecting back to you know, a fronted or even a database, a web
[45:55] server that restarted in the middle of something like those kinds of things like,
[46:00] that's where you want the metrics to show. Hey, this machine got into
[46:02] crisis and the supervisor killed the process and it recovery and continued, but it
[46:08] kicked off all this weirdness right, like I can. You're looking at it,
[46:13] You're looking at the trades and going, what the heck happened here?
[46:15] Right? Right? Is the is the program broken? It's just a bug?
[46:17] And it's like, no, this is what recovery looks. Yeah,
[46:20] yeah, exactly is one of these machines. Some of that is also built
[46:23] into the platform because we have insight into what are the failure how many failures
[46:29] are happening, So we also have messaging specific metrics already in there, and
[46:35] and yeah, now we're working to basically make sure that it also connects and
[46:40] feeds into the open telemetry signals so that if people are using it, that
[46:46] they get all of that information in there as well. Wow, that's pretty
[46:51] pretty substantially cool, especially when you start throwing cloud in here where it's entirely
[46:54] possible the cloud vendor might move you and it might have impact on your software,
[47:00] like stuff you literally don't have control over, Like hopefully your telemetry can
[47:02] surface that in a way where you're like, oh, this wasn't us.
[47:07] It's the vendor change something for whatever reason, and we should absorb it.
[47:12] But we don't know how yet because we've never had this happen before and right
[47:15] now we have to look at it and saying what would we do differently?
[47:17] Yeah, yeah, because we have sort of recoverability built in, so retries
[47:22] and all of that happens out of the box. You don't even have to
[47:25] configure them. But yeah, then it's like, okay, why does it
[47:30] take ten times for this message to be processed? Every time a message of
[47:36] that type comes in? Right, So it's you don't want to hide that
[47:38] away. It could be that maybe there's a database suffering underneath, right,
[47:43] it retries too quickly and it takes that long for that thing to get up
[47:45] to speed or yeah, yeah, along one of the side effects. Yeah,
[47:50] that's also why we have delayed retries. So we'll basically also have this
[47:53] sort of back off mechanism. We'll retry immediately. But if we see exactly
[47:59] that's too yep, yeah, it's the same. It's the same concept.
[48:01] Yeah. Yeah. So what's next for you? What are you doing next?
[48:07] What's in your inbox? What's in my inbox? Well, uh,
[48:12] we're so a techarama today. Then I'm taking a few days with the family.
[48:16] It's a long weekend, is it? It's a long Weekend's holiday Tomorrow?
[48:20] And then they're basically bridging to the weekend and then on Sunday, I'm
[48:25] leaving to Oslo for NDC. Very great. I will not be joining you
[48:30] there this year, so I heard. Yeah, not happy to hear that.
[48:34] Sorry, just schedules. Yeah. We love Oslo, we love NDC.
[48:37] We're there all the time. Usually, I'm gonna have to miss it
[48:39] this year. Yeah, I'm really excited to go. It's my first time
[48:43] at Oslo's top sure to get into. Yeah, you know, and I
[48:46] always loved the way they did the show on the floor in the but I
[48:51] kind of tell you this techarama's pretty close to the Yeah, and I have
[48:57] it homies. Yeah, yeah, all right, it's really cool. Everybody
[49:01] give it up for Lila Bilbria and we'll see you next time on dot net
[49:09] rocks. Dot net Rocks is brought to you by Franklin's Net and produced by
[49:36] Pop Studios, a full service audio, video and post production facility located physically
[49:42] in New London, Connecticut, and of course in the cloud online at pwop
[49:47] dot com. Visit our website at dt n et r ocks dot com for
[49:52] RSS feeds, downloads, mobile apps, comments, and access to the full
[49:58] archives going back to sh number one, recorded in September two thousand and two.
[50:02] And make sure you check out our sponsors. They keep us in business.
[50:07] Now go write some code. See you next time. You got a
[50:10] dead middle band

Shows are listed from Apple Podcasts' charts and directory, and Podcast Index where it is used. Every show and episode belongs to its publisher and plays from the publisher's own feed; this site hosts none of them.
