Analyzing performance
Let’s first run the demo application using the $ docker-compose up --build
command. It will start local MongoDB and Redis instances along the application and observability stack.
You can create some records with a tool such as curl
:
$ curl -X POST http://localhost:5051/records \ -H "Content-Type: application/json" \ -d '[{"name":"foo"},{"name":"bar"},{"name":"baz"}]'
It should return a list of record identifiers the service created.
Now, let’s look at the Jaeger trace at http://localhost:16686
, like the one shown in Figure 12.1:
Figure 12.1 – Trace showing bulk record creation
We see a controller span (Records
) and then CreateRecords
, which describes a database-and-cache-encompassing operation. It’s a parent of the BulkWrite
span, which describes a MongoDB call and three individual Redis spans...