How Sprkl uses Sprkl to fix a REST API error

How Sprkl uses Sprkl to fix a REST API error

Erez Voitiz
Erez Voitiz 2 Min Read

Yes, we’re also eating our own dog food. Like any young company, we’re moving quickly and uncovering a good deal of new problems as we move along. I’m sure we’ll have plenty of opportunities to test our “Personal Observability” concept before rolling it out to users. So far eating our own dog food tastes good. Here’s how I used Sprkl to fix a REST API error mis a middleware.

The context

I was trying to add a proxy to an existing DB collection. To do so, I added a new microservice (which will act as the proxy) that implements a REST API to enable reading & writing to the DB. The run failed. 🙁

The tale

  • I added calls to the REST API in relevant places in multiple other microservices.
  • I tried to run the code and see how it performs. The run failed, and I didn’t know why.
  • I decided to use Sprkl, our Personal Observability tool.

Here’s how I used Sprkl

  • I ran Sprkl and afterward reproduced the error.
  • The dashboard then showed the exact exception thrown and where it was thrown from. It also provided the trace which,  helped me understand which flow caused the error.
  • The error was thrown from one of the REST APIs which missed a middleware required to get body parameters for POST requests.

At that point, I knew where the problem was but I wanted to know if the rest of the code worked as expected.

See the example below:

Here’s how Sprkl solved the problem

  • I navigated to one of the other methods, implemented and saw the telescope icon which indicated it ran successfully. I went over the last trace of that block and saw that BOOM it worked as expected.

Truth is, dogfooding is pretty fun! It’s actually very exciting to build products that work.

Any thoughts? Or If you’re curious about Sprkl or about Personal Observability? Ping me

Erez V

Share

Share on facebook
Share on twitter
Share on linkedin

Enjoy your reading 2 Min Read

Further Reading