First version of the tracing library
[ric-plt/tracelibcpp.git] / README.md
1 # RIC tracing helper library
2
3 The library includes a function for creating a tracer instance.
4
5 ToDo: tracer configuration options
6
7 ## Usage
8
9 Create a global tracer
10
11 ```c
12     #include <opentracing/tracer.h>
13     #include <tracelibcpp/tracelibcpp.hpp>
14
15     opentracing::Tracer::InitGlobal(tracelibcpp::createTracer("my-service-name"));
16 ```
17 Span context propagation between different software components in RIC is using a
18 TextMap carrier and JSON format serialization.
19 The [opentracing C++](https://github.com/opentracing/opentracing-cpp) Readme gives examples
20 how span context **inject** and **extract** with textmap can be done.
21 Serialization to JSON can be done with any JSON library.
22
23 ## Requires
24
25 cmake
26 gcc/c++
27
28 ## Build
29 mkdir build
30 cd build
31 cmake ..
32 make
33
34 ## Unit testing
35 To run unit tests the project needs to be configured with testing option
36 cmake -DWITH_TESTING=ON ..
37 make check
38 Or with output
39 CTEST_OUTPUT_ON_FAILURE=1 make check
40
41 ## License
42
43 See [LICENSES.txt](LICENSES.txt) file.