A minimalistic guide to distributed tracing with OpenTracing and Jaeger

If you have ever worked on a distributed application you will know that it is difficult to debug when things go wrong. The two common tools to figure out root cause of the problem are logging and metrics. But the fact of the matter is that logs and metrics fail to give us complete picture of a situation in a distributed system. They fail to tell us the complete story.

If you are building a system using Microservices / Serverless architecture then you are building a distributed system.

Logs fail to give us the complete picture of a request because they are scattered across a number log files and it is difficult to link them together to form a shared context. Metrics can tell you that your service is having high response time but it will not be able to help you easily identify the root cause.

Logging and Metrics are not enough to build observable systems.

Observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs. It helps bring visibility into systems. – Wikipedia

Logs, metrics, and traces are the three pillars of observability. While most software teams use logging and monitoring few of them use traces. Before we look at distributed tracing in depth, let’s define logs, metrics, and traces.

Continue reading “A minimalistic guide to distributed tracing with OpenTracing and Jaeger”

Using Jenkins Config File Provider Plugin to allow Jenkins slave to access Maven’s global settings.xml

This week I had to write a Jenkins pipeline script (Jenkinsfile) that involved publish build artifacts to Nexus. The project is a Java Maven based Spring Boot application. The build script uses Maven Nexus plugin to publish build artifacts to Nexus. The build pipeline was executed on slaves running on OpenShift container platform. The build pipeline was failing when deploying to Nexus. The build was failing with Return code is: 401, ReasonPhrase: Unauthorized.

It was clear that issue is related to Nexus credentials not available to Maven. The Nexus credentials were available in Maven global settings.xml that resides under ~/.m2/settings.xml. In our case, settings.xml was available on the Jenkins master. As build pipeline ran on slave it does not had access to Jenkins settings.xml.

Continue reading “Using Jenkins Config File Provider Plugin to allow Jenkins slave to access Maven’s global settings.xml”