Instrumentation

Instrumentation is the process of adding annotations or new lines in the code to view traces when an issue has occurred within the application. It helps to identify major issues within the code by instrumenting specific area in the code. There are two types of instrumentation:

Auto Instrumentation - Auto instrumentation uses opentelemetry-api to view traces within the code. It creates span for a method using the @WithSpan annotation for which it is annotated with within the code.
Manual Instrumentation - Manual instrumentation involves manually adding new lines of code. It uses opentelemetry-api and opentelemetry-sdk to view traces within the code.

In the below figure @WithSpan indicates Auto-instrumentation process and Span span = Span.current() indicates Manual instrumentation process.

Example of Auto and Manual Instrumentation