An introduction to the open source solution OpenTelemetry and how to use it with Prometheus

Author: Zen and the Art of Computer Programming

1 Introduction

OpenTelemetry is an open source project under CNCF (Cloud Native Computing Foundation). Its goal is to become the de facto standard in the field of application performance monitoring in the cloud native era. It has now become the de facto standard for tools such as Prometheus and Jaeger. OpenTelemetry provides a unified API and SDK, allowing developers to build applications in various languages ​​based on this. Due to the functional differences between OpenTracing and OpenCensus, OpenTelemetry will be the next-generation tracking standard and will be officially announced for release in early 2020.

The author of this article will explain a series of knowledge points through the introduction of OpenTelemetry and how to use it in conjunction with Prometheus, so as to help readers better understand OpenTelemetry and learn how to better use it in actual work.

2. Explanation of basic concepts and terms

2.1 Opentracing

Opentracing is an API for logging and tracing distributed requests, consisting of a set of lightweight, portable libraries that provide APIs for a variety of programming languages ​​and frameworks. In order to be able to take advantage of Opentracing, developers need to adopt certain programming methods, such as using Thread Local-based data structures with contextual Span, and configure the data collection component. When a node in the calling link fails or times out, context information can be used to quickly locate the problem and perform error analysis.

Span

Span usually represents a unit of work with an independent life cycle, including the name, timestamp, SpanContext, parent SpanId, and other related properties of the unit of work. Every Span has a start time and end time.

Tracer

Guess you like

Origin blog.csdn.net/universsky2015/article/details/132931082