X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=README.md;fp=README.md;h=058131862b9c116a8686b3bf59eaf64f4c30e35b;hb=ddcdb2e4318b9150352f15a7263024fff1ed41e2;hp=e11effcacf5bbf6268115652915e2f51130e9e46;hpb=ec2463b984499df638d1a342dad7ba730d8a04c3;p=ric-plt%2Ftracelibgo.git diff --git a/README.md b/README.md index e11effc..0581318 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ The library creates a configured tracer instance. -ToDO: configuration... ## Usage @@ -49,6 +48,23 @@ The serialized span context is got, for example, from the RMR library. span := opentracing.GlobalTracer().StartSpan("go test span", opentracing.ChildOf(context)) ``` +## Configuration + +The trace library currently supports only [Jaeger](https://www.jaegertracing.io/) [golang client](https://github.com/jaegertracing/jaeger-client-go) 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. + + ## Unit testing GO111MODULE=on go mod download