]> git.proxmox.com Git - ceph.git/blob - ceph/doc/dev/developer_guide/jaegertracing.rst
import quincy beta 17.1.0
[ceph.git] / ceph / doc / dev / developer_guide / jaegertracing.rst
1 JAEGER- DISTRIBUTED TRACING
2 ===========================
3
4 Jaeger + Opentracing provides ready to use tracing services for distributed
5 systems and is becoming the widely used standard because of their simplicity and
6 standardization.
7
8 We use a modified `jaeger-cpp-client
9 <https://github.com/ceph/jaeger-client-cpp>`_ the backend provided to the
10 Opentracing API, which is responsible for the collection of spans, these spans
11 are made with the use of smart pointers that carry the timestamp, TraceID and other
12 meta info like a specific tag/log associated with the span to uniquely identify
13 it across the distributed system.
14
15
16 BASIC ARCHITECTURE AND TERMINOLOGY
17 ----------------------------------
18
19 refer to the `Ceph Tracing documentation <../../../jaegertracing/#basic-architecture-and-terminology>`_
20
21
22 HOW TO GET STARTED USING TRACING?
23 ---------------------------------
24
25 Enabling jaegertracing with Ceph needs deployment Jaeger daemons + compiling
26 Ceph with Jaeger, orchestrated to be used in vstart cluster for developers, this
27 uses a jaeger `all-in-one docker
28 <https://www.jaegertracing.io/docs/1.22/getting-started/#all-in-one>`_ which
29 isn't recommended for production, but for testing purposes. Let's look at all the
30 steps needed:
31
32 1. Update system with Jaeger dependencies, using install-deps::
33
34 $ WITH_JAEGER=true ./install-deps.sh
35
36 2. Compile Ceph with Jaeger enabled:
37
38 - for precompiled build::
39
40 $ cd build
41 $ cmake -DWITH_JAEGER=ON ..
42
43 - for fresh compilation using do_cmake.sh::
44
45 $ ./do_cmake.sh -DWITH_JAEGER=ON && ninja vstart
46
47 3. After successful compiling, start a vstart cluster with `--jaeger` which
48 will deploy `jaeger all-in-one <https://www.jaegertracing.io/docs/1.20/getting-started/#all-in-one>`_
49 using container deployment services(docker/podman)::
50
51 $ MON=1 MGR=0 OSD=1 ../src/vstart.sh --with-jaeger
52
53 if the deployment is unsuccessful, you can deploy `all-in-one
54 <https://www.jaegertracing.io/docs/1.20/getting- started/#all-in-one>`_
55 service manually and start vstart cluster without jaeger as well.
56
57
58 4. Test the traces using rados-bench write::
59
60 $ bin/rados -p test bench 5 write --no-cleanup
61
62 .. seealso::
63 `using-jaeger-cpp-client-for-distributed-tracing-in-ceph <https://medium.com/@deepikaupadhyay/using-jaeger-cpp-client-for-distributed-tracing-in-ceph-8b1f4906ca2>`