Che: Opentracing support for k8s / OpenShift infrastructures in Che

Created on 5 Jul 2018  路  5Comments  路  Source: eclipse/che

Introduction

Opentracing is vendor-neutral APIs and instrumentation for distributed tracing which allows to switch tracer implementation with O(n) complexity (e.g. switching between jaeger & zipkin is just a mater of updating the tracer config & no need to update opentracing related code).

Motivation

When opentracing support would be added to Che this would allow to collect metrics like request duration / error rate easily. This would be particularly useful for multi-user use case and would be also handy for single-user in order to identify potential bottle-necks in the system.

Demo

A short demo with collecting metrics between che-starter and che-server using zipkin as a tracer - https://youtu.be/4tWeH8JqQQk

Tasks

Is Tracing is the same as logging ?
No. Tracing is mostly focused on metrics like request duration / error rate in the microservice environment with possibility to identify bottle-necks across the system.
image

Should tracing (instrumentation) be always separate from logging ?
Every case is a case, but in general it is common to separate tracing from logging.Correlation between logs and traces happens by passing trace_id to every log entry. On the other hand, frameworks like Spring Cloud provide a possibility to record log entries within the relevant tracing spans. To put it in a nutshell, it depends on the application. If performance is critical adding all logs to tracing spans would appear to be costly operations, but if it is just a small service where performance is not an issue, it makes sense to store logging with spans. For Che case opentracing makes the most sense for multi-user user-case so it would be better to fallback on the approach with separating logs & traces and add logs to the tracing spans only if this data would be useful for investigation of metrics like request duration / error rate.

kinepic

All 5 comments

I agree to the separation between logs and traces.
They have separate purposes. Logging is critical part for analysis and should have essential information to detect problems while tracing should mainly detect latency and bottleneck and should have minimal data to avoid severe performance issues.
So If both are required in Che it should be better to separate between logging and tracing even for small services.

agree, so for correlation between logs & traces it would be required to put the trace_id to every log entry

trace_id was added to the logging epic #10290 as an optional custom param that can be added to the log's record.

If there's anything you need regarding Jaeger, let me know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skabashnyuk picture skabashnyuk  路  3Comments

InterestedInTechAndCake picture InterestedInTechAndCake  路  3Comments

LaneGeek picture LaneGeek  路  3Comments

sleshchenko picture sleshchenko  路  3Comments

sleshchenko picture sleshchenko  路  3Comments