In order to make a system observable, it must be instrumented: That is, code from the system’s components must emit traces, metrics, and logs.
“Instrumentation” referring to the act of collecting trace data. 2 ways to instrument the code
If you are using Kubernetes, you can use the OpenTelemetry Operator for Kubernetes to inject auto-instrumentation libraries for .NET, Java, Node.js, Python, Go into your application
If applicable a language specific implementation of OpenTelemetry will provide a way to instrument your application without touching your source code.
Configuration is available via environment variables and possibly language specific means such as system properties in Java. At a minimum, a service name must be configured to identify the service being instrumented. A variety of other configuration options are available and may include:
These provide a hybrid solution where developers can use prebuilt libraries to instrument their code while still having the flexibility to customize when needed. These are specific to a programming language or framework and are integrated by importing them into the code. Often used in conjunction with Auto instrumentation which dynamically injects Observability into applications without code changes.
Instrumentation libraries provide integration for the framework that lacking native integration.
OpenTelemetry Registry allows you to search for instrumentation libraries - Registry
Note: Libraries might be testing phase or limited support.
Examples:
To facilitate the instrumentation of applications even more, you can manually instrument your applications by coding against the OpenTelemetry APIs.
Steps:
Next Chapter: Sampling
Main Page: Click Here