 Hi, welcome to the last test in your Prometheus remote byte endpoints. My name is Daniel. I'm a set reliability engineer at Q6.io, and on my free time, I help maintain reference and tempo. You can reach me on some places online, so if you want, please go ahead. So Prometheus offers this remote byte API that lets you send samples for a Prometheus instance to some external backends. There are a lot of compatible backends. Two of the most prominent ones are Cortex and Thanos. Also, it's interesting that Prometheus itself supports remote byte signs 2.25. It's a experimental feature, but it's something very good. So some weeks ago, actually, this is why this talk exists. I deployed Cortex in my cross-existed mode on top of Kubernetes, and I did this for learning purposes. And the setup was great, and I thought that everything was running smoothly, but I had some questions. I wasn't sure if I had configured all the components properly, and I didn't know if I had provisioned enough resources in Kubernetes to handle some basic loads. So what I wanted to do is I wanted to generate some loads on this ingestion path to understand how Cortex will behave and how all the components will work. So I picked my favorite load testing tool for the job, and that tool is Q6. Q6 is an open source tool written in Go that lets you create your tests as code in JavaScript, even the configuration can be code, so you can cap everything on a repository or Q3 repository. I want to say, as a disclaimer, that I work for Q6 for the company behind it, but I have to say that I'm here not because I'm a sponsor or something like that. It's just because I like the tool, and I think that it's useful for some user spaces. So I thought, OK, I can create a test in Q6 using JavaScript for testing my remote write-in point app. That's it. But I'm a little lazy, and I thought, but I don't want to write that much JavaScript. So yeah, here it comes. Disclaimer, this stuff is experimental, but cool, keep that in mind. Earlier this year, Q6 developers added support for Q6 extensions. And this means that you can write Go code, use your Go models, and call that code for JavaScript for your test. So when I saw this, I went to F and I created a bunch of extensions, and one of them was for remote write-in. So this extension is really basic, but we will see how to use it. Yeah, I hope you like it. So for using the extension, you have to create your own Q6 binary. This is very easy. You just have to download the XQ6 helper. And once you have that, you put the version of Q6 that you want to use as a base and put the name of the extensions that you want to bundle onto this new binary. Once we have the binary, we can create our test. As you can see, I'm importing my remote write extension in JavaScript. I'm instantiating a new client pointing to my remote write backend. And once I have that, I can use the store now methods. This method is used for sending a sample to this remote write backend, some labels with some value, right? And storing this sample. Also, I'm checking that the response from this request is 200, because I want to see if everything went right properly. I'm going to run this for 10 seconds and with 50 reproducers. When I run this, Q6 is going to give me a lot of information on how my test, my really basic test performed. I get some basic metrics generated by Q6, but also custom metrics that my extension generates, like, remote request duration and remote write request total. So probably you are thinking, okay, Daniel, it's handy to get this summary, but I would like to see how these metrics perform over time to understand how my test behaves. And Q6 supports this. You can ship your metrics in real time to some backend and to charge them whatever you want. The thing is that Prometheus is not yet supported. So how does the future look like? For the remote write extension, I mean, it's tiny, it works, and it lets you model almost any scenario that you want. You can write your JavaScript codes and model it as any other test. I would like to refactor it a bit to use the official remote write client, but yeah. On the other hand, about the exporter or the output to Prometheus, it's something that we don't have. There are ideas to add the support to Prometheus. There is like a related issue. If you want to have this on Q6, so you think that it's interesting, please go ahead, comment what you will expect of this integration and yeah, just give a like on this if you find it useful. On the other hand, I want to ask that this can be implemented as an exquisit output extension. Someone from community already added one for an influx DB version too. So maybe when this talk is released, we already have one for Prometheus. Thank you a lot for coming to my presentation here at Procom and I hope you have fun. Bye.