- Добавил: literator
- Дата: 3-03-2023, 09:26
- Комментариев: 0

Автор: Daniel Gomez Blanco
Издательство: Apress
Год: 2023
Страниц: 236
Язык: английский
Формат: pdf
Размер: 10.08 MB
Learn the value that OpenTelemetry can bring to organizations that aim to implement observability best practices, and gain a deeper understanding of how different building blocks interact with each other to bring out-of-the-box, vendor-neutral instrumentation to your stack. With examples in Java, this book shows how to use OpenTelemetry APIs and configure plugins and SDKs to instrument services and produce valuable telemetry data. You’ll learn how to maximize adoption of OpenTelemetry and encourage the change needed in debugging workflows to reduce cognitive load for engineers troubleshooting production workloads. For each type of signal, that is, baggage, traces, metrics, and logs, this book explores their APIs, SDKs, and best practices needed to instrument applications both manually and automatically via instrumentation libraries. Common use cases for these signals are illustrated with examples in Java, providing short code snippets aimed at explaining individual concepts. To manage context within an application, OpenTelemetry provides a cross-signal Context API to manage key-value pairs. Although this depends on the language, context is not normally handled explicitly, that is, developers don’t need to pass a context object around method invocations. For instance, in Java, it is stored in thread-local storage by default. In this case, the API provides a way to attach, detach, and obtain the context for a current execution.