Configuring OpenTelemetry logging
Unlike with the two signals we covered in Chapter 4, Distributed Tracing, and Chapter 5, Metrics - Recording Measurements, the logging signal in OpenTelemetry does not concern itself with standardizing a logging interface. Many languages already have an established logging API, and a decision early on in OpenTelemetry was made to leverage those pre-existing tools. Although OpenTelemetry provides an API capable of producing logging, which we'll use shortly, the signal is intent on hooking into the existing logging facilities. Its focus is to augment the logs produced and provide a mechanism to correlate those logs with other signals. Figure 6.1 shows us the components of the logging pipeline:
These components combine to produce log records and emit them to external systems. The logging pipeline is comprised of the following:
- A
LogEmitterProvider
, which provides a mechanism...