text
stringlengths
0
1.8k
**Tom Wilkie:** That's right.
**Gerhard Lazu:** And in the context of the operator, we could get the whole stack. Working with that -- we used that for Changelog. It was really hard, because we had Jsonnet, it was a specific version of Jsonnet... There was a Go one, and there was (I think) a Python one, or a JavaScript one... I can't remember. But ...
So the mixins that you're talking about, how would you use them? Let's imagine that you're running on Kubernetes. How would you use those mixins?
**Tom Wilkie:** \[35:52\] This is a really interesting point, because the mixins are Advanced mode. It's like Hard mode. The mixins are solving a problem that software developers have. It's like, how do I package and redistribute and version-control and keep up to date? It's not really an end user format. I wouldn't ex...
So just to address some of the initial challenges. There's a C version and a Go version of Jsonnet, and they weren't quite the same. The Go version didn't have formatting, for instance. The Go version has caught up, and is now what most people use. That's kind of -- we solved that problem.
We've also developed a lot more tooling, right? So there's mix tool and there's Grizzly, and there's Tanker, and there's a whole kind of ecosystem (Jsonnet Bundler) of tools to use to manage these. And where it works particularly well is if you're in an organization with sophisticated config management. We have a sing...
**Gerhard Lazu:** Is it public, please? Can you add me to it? \[laughs\]
**Tom Wilkie:** Unfortunately not, but there's lots of examples we use from it. But yeah, we've got this one repo, and it's that monorepo approach to conflict management at least where mixins really fit nicely, because you can use Jsonnet bundler to package-manage them. And then the really cool thing comes in - you pro...
That's where the vision was. That's a bit advanced. It's a bit much to ask for most people. And also, it's a bit opinionated. You have to have the complete stack, end to end, bought into the whole thing, to really realize that benefit. And let's face it, other techniques: Customize and CUE are gaining more popularity t...
You kind of touched on something really important here... It was too hard to use. So what we've been doing in Grafana Cloud really for the past year or so is trying to make a kind of more opinionated, more integrated, easier to use version of all of that. You sign up to Grafana Cloud, you deploy the agent, so that's th...
And then within that instance, we've built a service that -- it's almost like an app store; you can select the integration you want to install... "Oh, I wanna monitor some MySQL. I wanna monitor some Kubernetes. I wanna monitor Docker." And it will install the dashboards and the alerts and it will keep them up to date ...
Behind the scenes, this is all mixins. This is all Jsonnet, this is all automation we've built to make this whole thing easy to use and integrated and opinionated. It's much harder to do that easy-to-use story in open source, because the opinions change, and the integrations change. But in cloud, where it's a much more...
**Break**: \[39:59\]
**Gerhard Lazu:** As I was saying, we used Jsonnet Bundler (JB). I remember the Kuber Prometheus operator and the Kube Prometheus stack which was generated out of that... So we did away with all of that. We've obviously set up our own Grafana, set up Loki, set up Prometheus... Now all we have is a Grafana Agent, which ...
**Tom Wilkie:** Great.
**Gerhard Lazu:** Alex Koutmos was working close with the Grafana team. He's also a friend of Changelog's, a very close friend. We work together; we even did a couple of episodes together... Even a YouTube stream on how we upgraded Erlang 24 and we were using Grafana Cloud to see the impact of that for Changelog.com.
**Tom Wilkie:** Nice.
**Gerhard Lazu:** It was a Friday evening deploy. PromEx was there... It was a great one; we had great fun. It was a few weeks back. So in that world, the dashboards - I still feel they are the strongest thing and the best thing that you have, but also the most difficult one to integrate... Because the Grafana Agent do...
**Tom Wilkie:** Yeah.
**Gerhard Lazu:** So I'm wondering, how could that be done better? Do you have some ideas?
**Tom Wilkie:** There's some kind of guidelines for building dashboards, in my opinion. First thing - you should always template out the data source. Different Grafana installations will name their data sources different things, and so a dashboard imported from one might not necessarily work in another. So I always mak...
The second thing - I always tend to template out the job and the instance labels, maybe with wildcard selectors. And again, same reason - this means the dashboard can effectively dynamically discover what jobs you've got with certain metrics. This actually fits a pattern in Prometheus really nicely, where we have this ...
\[44:11\] And again, this kind of turns a static dashboard that might have encoded to use a particular set of labels into a very dynamic dashboard, which allows you to select the job you wanna look at, and it also means that the chances are when you load it, as long as there's some job exporting some relevant metrics, ...
**Gerhard Lazu:** Right.
**Tom Wilkie:** Second thing - I'm a big fan of dashboards as code. So I actually don't tend to build my dashboards in Grafana. I tend to build them in my text editor, and I tend to use Jsonnet, unfortunately. I tend to use a library called Grafonnet, or there's another one called Grafonnet Builder... And if you don't ...
**Gerhard Lazu:** That sounds exactly what I would want. You've described my ideal approach. But first of all, I didn't know about those tools. Second of all, I'm not aware of any article, any video, anything like this that runs you through how to do this. So what I would want to do is to go through that and capture it...
**Tom Wilkie:** I think the reason we don't promote it too widely is because the 80% use case for Grafana is editing dashboards in Grafana. And that's easy to access, easy to use, it's very visual, it's very rewarding to do that. The 20% use case that I've just described is the serious SRE DevOps approach. And I think ...
I referenced that hackathon earlier that we were doing internally, and I know that we've got some cool stuff coming out that maybe will be the final form of this.
**Gerhard Lazu:** I know that I'm very excited about trying it out. This is a dream, and you can say no, right? Or like - not dream, but like a crazy plan. What would it look like if we paired, for an hour -- I've been doing it for close to a decade, so I think I'm pretty good (or so others say) to have a go at this. M...
**Tom Wilkie:** No, I'd love to.
**Gerhard Lazu:** ...just to get a hang of things. So - okay, I'm thinking YouTube stream, I'm thinking--
**Tom Wilkie:** Yeah, let's do it.
**Gerhard Lazu:** Wow, okay.
**Tom Wilkie:** Can we use VS Code sharing? Because I've always wanted to use that, and I haven't had an opportunity to.
**Gerhard Lazu:** Anything you want. You're the driver. You're just showing me how it's done, and then maybe we can switch over and I can have a go to see if I understood it correctly in the context of Changelog.com... Because we are already using Grafana Cloud; the integration is there. We're already using Grafana Age...
**Tom Wilkie:** Yeah, I agree.
**Gerhard Lazu:** Because I don't think people know -- I've never heard this before. Jsonnet, JB... But I was doing it wrong, and I didn't even know until today... So thank you, Tom.
**Tom Wilkie:** I wouldn't say you were doing it wrong, but you didn't see the full -- you didn't get an opportunity to use the full process.
**Gerhard Lazu:** \[48:00\] ...to do it right. I didn't have the opportunity to do it right. Okay.
**Tom Wilkie:** I mean, that's one of the big challenges of this approach, is there's a lot to learn, there's a lot to consume, and you don't really see the benefits until you do it all... Which is, from a developer experience perspective, awful. There's no kind of incremental reward that goes with it, which is what we...
**Gerhard Lazu:** We talked about metrics quite a bit, we talked about logs, but we haven't talked about traces. I think it's a very important element. We ourselves are not using traces, and I can see the traces being instrumental, critical, essential to understanding why our requests are slow. If you have a trace, you...
So how would we use traces to understand that? First of all, how does it work? This is Tempo, I know that's the component -- would you call it a component? What would you call it?
**Tom Wilkie:** I tend to call it either a project or a service, depending on the context.
**Gerhard Lazu:** Okay, so the Tempo service. How do we use it for traces and would it integrate in the problem or how it solves the problem that I just described?
**Tom Wilkie:** This is a really interesting one, because in the metrics world we develop exporters, which gather numeric data from other systems and exposes them as metrics. The barrier to entry for metrics is kind of medium. Maybe it's kind of three feet tall. For logs - everything has logs. It's so easy to get logs ...
The barrier to entry for traces is super-high. You need to have systems that instrument it, you need to correctly propagate the context, the trace ID, and you need to have a way of kind of distributing this telemetry data. So this is the challenge in the tracing space right now, and this is why I think it's always the ...
The good news is there's a huge reward for that investment, and particularly whenever you're looking at any kind of performance challenges, tracing is invaluable. We've been doing a lot of distributed tracing for a long time in Grafana Labs. We've started with Jaeger and eventually did our own thing with Tempo, and it'...
How do you do it? So there's some good news here. One of them is OpenTelemetry, very kind of cross-functional projects, from many different contributors and vendors, that is designed really to make the whole telemetry journey better and easier and simpler. And the most well-developed bit of OpenTelemetry and the bit th...
You set up the Grafana Agent to forward those traces up to Grafana Cloud, to Tempo, and then Tempo deals with the storage of them. And that's really what the component is. All that leaves is for you to deal with the instrumentation.
Now, the good news is with a lot of the high-level languages, a lot of dynamic languages you can use auto-instrumentation. So this is part of OpenTelemetry's client libraries that come along, and for instance with most Java web frameworks, with most Python frameworks, it's like one line of code, or maybe it's even no c...