What are some tools or methods for debugging microservices?
I am considering a microservices developer role and was wondering what some tools or strategies to debugging microservices are.
My friends told me to 'just do monolithic', but there has to be a way right? Not everyone uses monolithic and microservices are good job experience?
5 Replies
im noit a microservices dev but i would assume you follow the same principles as normal. meaning unit tests, integrationtests, stubbing/mocking dependencies, etc.
if you just want a tool to do restrequests postman is pretty much up there, there are couple foss alternatives
lots of logging and something like OpenTrace
essentially any request to any service will create a trace id that is passed on to any other call made by that service for that request
If you deploy to Azure, you can enable remote debugging on App Services and remote debug it with Visual Studio fairly easily, breakpoints and inspections all work.
In Docker Images there's an image IIRC you can target that has remote debugging stuff installed you can use as well, if your services are containerized
This one?
https://opentracing.io/
Thanks! Is it this one? https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging-azure-app-service?view=vs-2022
yeah,but I guess they recommend https://opentelemetry.io/ these days
but the idea is the same
you gradually build a request id chain so you can identity where a request originated from and what "path" it took
then pray to god you have good logging turned on and can follow the trace 😄
for local development, just run all services with a debugger attached. no different from normal app dev, except a bit more cumbersome