X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=README.md;h=a83f708746fde4c71d491de8e1c8adf6d7f24bb3;hb=refs%2Fheads%2Fg-release;hp=2acd2dd48fd3cb5f4cfdbe301223220b07775cd9;hpb=95f44a5947a1f340db94b9d821e16e4a373e6e69;p=ric-plt%2Ftracelibcpp.git diff --git a/README.md b/README.md index 2acd2dd..a83f708 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # RIC tracing helper library -The library includes a function for creating a tracer instance. - -ToDo: tracer configuration options +The library includes a function for creating a configured tracer instance. +It hides the underlaying tracer implementation from the application. ## Usage @@ -20,10 +19,27 @@ The [opentracing C++](https://github.com/opentracing/opentracing-cpp) Readme giv how span context **inject** and **extract** with textmap can be done. Serialization to JSON can be done with any JSON library. +## Configuration + +The trace library currently supports only [Jaeger](https://www.jaegertracing.io/) [C++ client](https://github.com/jaegertracing/jaeger-client-cpp) tracer implementation. +The configuration is done using environment variables: + +| environment variable | values | default | +| ---------------------------- |------------------------------------ | -------------- | +| TRACING_ENABLED | 1, true, 0, false | false | +| TRACING_JAEGER_SAMPLER_TYPE | const, propabilistic, ratelimiting | const | +| TRACING_JAEGER_SAMPLER_PARAM | float | 0.001 | +| TRACING_JAEGER_AGENT_ADDR | IP addr + port | 127.0.0.1:6831 | +| TRACING_JAEGER_LOG_LEVEL | all, error, none | none | + +Meaning of the configuration variables is described in Jaeger web pages. +By default a no-op tracer is created. + ## Requires cmake gcc/c++ +opentracing-cpp version 1.5.0 ## Build mkdir build @@ -46,6 +62,21 @@ lcov -c --no-external --base-directory $(dirname $PWD) --directory . --output-f genhtml cov.info ``` +## Binary package support +Binary packages of the libary can be created with `make package` target, or with +the Dockerfile in the `ci` directory. + +The Docker build executes unit tests and compiles binary packages which can then be +exported from the container by running it and giving the target directory as a command line +argument. The target directory must mounted to the container. + +```shell +# Build the container +docker build -t tracelibcpp -f ci/Dockerfile . +# Export binary packages to /tmp +docker run -v /tmp:/tmp tracelibcpp /tmp +``` + ## License See [LICENSES.txt](LICENSES.txt) file.