Metrics, Tracing, Logging fusion

final goal

OpenTelemetry final state is to achieve fusion Metrics, Tracing, Logging as the ultimate solution CNCF observability.

Tracing: Providing a request received from the tracking paths processed throughout the life cycle, requests are generally processed in a distributed system, it is also called Distributed Link Trace.
Metrics: an external system providing the quantization index for each dimension /, generally including Counter, Gauge, Histogram like.
Logging: to provide the most refined system processes information / such a critical variables, events, access to records.

These three missing in a non-observability: Metrics found that abnormal based alarms through Tracing positioning of (suspected) module, according to locate the source of the error log module specific details, and finally adjusted based on investigative experience this problem Metrics ( increase or adjust the alarm thresholds, etc.) so that next time earlier discovery / prevent such problems.

Key Metrics, Tracing, Logging fusion

Achieve Metrics, key Tracing, Logging integration is the ability to get the relationship between the three of which we can be focused according to the most basic information, such as: time, Hostname (IP), APPName. The most basic of information can only be targeted to a specific time and modules, but it is difficult to continue Digin, so we put TraceID to print to Log in, this can be done Tracing and Logging associations. But that still will not solve many problems:

  1. How to associate Metrics and the other two
  2. How to provide more dimensions associated with, for example, the name of the requested method, URL, user type, equipment type, geographic location, etc.
  3. How consistent relationship, and can spread in a distributed system

Try to use the Context to provide a unified Metrics, Logging, Tracing context OpenTelemetry, the three-caught can access this information by OpenTelemetry itself is responsible for providing storage and dissemination of Context:

    • Context data in the execution cycle Task / Request's can be accessed
    • It provides a unified storage layer for storing Context information, and will work to ensure (for example, a single-threaded model, thread pool model, CallBack model, Go Routine models, etc.) in a variety of languages ​​and processing models
    • Based on a variety of dimensions associated Tag (or called Meta) information implemented, Tag content is determined by the service, for example: the production by TrafficType to distinguish traffic flow or pressure measurement, to analyze the various types of data through the DeviceType device ...
    • Context provides a distributed mode of transmission, for example by the W3C traceparent / tracestate head, GRPC protocol

Guess you like

Origin www.cnblogs.com/aguncn/p/11511758.html