Instrumenting Database Calls
In this chapter, we’re going to continue exploring instrumentation approaches for popular distributed patterns and will look into database instrumentation. We’ll use MongoDB as an example and combine it with Redis cache. We’ll add tracing and metrics instrumentation for database and cache calls and discuss how to add application context and provide observability in these composite scenarios. In addition to client-side instrumentation, we’ll see how to also scrape Redis server metrics with the OpenTelemetry Collector Finally, we’ll explore the generated telemetry and see how it helps with analyzing application performance.
Here’s what you’ll learn about:
- Tracing MongoDB operations
- Tracing Redis cache and logical calls
- Adding client- and server-side metrics
- Using telemetry to analyze failures and performance
By the end of this chapter, you’ll be familiar with generic database...