How to instrument once for multiple monitoring destinations
As discussed in the previous section, OpenTelemetry exposes vendor-agnostic semantics and APIs to your application. All you need to do is to implement your code with a dependency on OpenTelemetry and configure where to send the telemetry data. With that, you abstract away any vendor-specific details. To achieve vendor-agnostic semantics, OpenTelemetry classifies the different telemetry data, or signals, into three distinct categories:
- Traces
- Metrics
- Logs
Let us discuss what they are and how to implement them one by one.
Traces
A trace, also known as distributed trace, contains information about all the steps to fulfill a single user request inside and among different services. Multiple spans make up a single trace.
A span is a single work unit. Spans can be nested, so a span can have a parent span, while the first span without a parent is known as the root span. A span also has a span context...