When you write a couple of classes and just realise that there are functionalities that can be shared, a tendency is to create a parent / abstract class or define a utility class. But inheritance and global utilities are often hard to test, failed to encapsulate functionality and highly coupled. In practices, using an interface offers a better design.

In this instance, I have several Adapter classes (in Spring) that wrap synchronous JDBC calls with a thread pool.

@Component
class ReactiveUserRelationalAdapter(
@Autowired val repo: UserRepository,
@Autowired @Qualifier("jdbcScheduler") val jdbcScheduler: Scheduler
): ReactiveUserService {

This is the second part in a series about OpenTelemetry:

  • Part 1 — Distributed Tracing
  • Part 2 — Metrics and Logs (this post)
  • Part 3 — Cloud-native integration with AWS

Metrics

Telemetry has long been used in industries to monitor and predict potential issues. For example, most cars today have an onboard diagnostic system (OBD) that can be connected with a scanner to read its trouble code. A solar monitoring system can report metrics about energy consumption, production, grid export and import. In the software world, metric events are viable signals for monitoring overall system health. Mission-critical systems are designed to…


By Lev Polyakov (www.polyakovproductions.com)

When I had to investigate a production issue in the past, one of the first steps was correlating log entries from multiple servers to find out full journey of a request. It was a real pain in the neck. In many instances, I had to add an additional log entry, redeploy app and check again on the next day. The full process is painful and unproductive.

To make the matter worse, most of the modern software systems are no longer running in a single server, but across multiple machines, databases, SaaS, and cloud vendors. They are implemented in different programming…

Nam Nguyen

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store