From 8fd139157d958ef9efbbddb3190cd0dd39f7be3e Mon Sep 17 00:00:00 2001 From: pokutuna Date: Sat, 13 Mar 2021 17:38:11 +0900 Subject: [PATCH] docs: fix links & headings about built-in samplers (#2011) Co-authored-by: Valentin Marchaud --- packages/opentelemetry-core/README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/opentelemetry-core/README.md b/packages/opentelemetry-core/README.md index 080bb3d0ca4..dbc04e6382a 100644 --- a/packages/opentelemetry-core/README.md +++ b/packages/opentelemetry-core/README.md @@ -16,9 +16,10 @@ This package provides default implementations of the OpenTelemetry API for trace - [Composite Propagator](#composite-propagator) - [Baggage Propagator](#baggage-propagator) - [Built-in Sampler](#built-in-sampler) - - [Always Sampler](#always-sampler) - - [Never Sampler](#never-sampler) - - [Probability Sampler](#probability-sampler) + - [AlwaysOn Sampler](#alwayson-sampler) + - [AlwaysOff Sampler](#alwaysoff-sampler) + - [TraceIdRatioBased Sampler](#traceidratiobased-sampler) + - [ParentBased Sampler](#parentbased-sampler) - [Useful links](#useful-links) - [License](#license) @@ -66,7 +67,7 @@ api.propagation.setGlobalPropagator(new HttpBaggage()); Sampler is used to make decisions on `Span` sampling. -#### AlwaysOn +#### AlwaysOn Sampler Samples every trace regardless of upstream sampling decisions. @@ -81,7 +82,7 @@ const tracerProvider = new NodeTracerProvider({ }); ``` -#### AlwaysOff +#### AlwaysOff Sampler Doesn't sample any trace, regardless of upstream sampling decisions. @@ -94,7 +95,7 @@ const tracerProvider = new NodeTracerProvider({ }); ``` -#### TraceIdRatioBased +#### TraceIdRatioBased Sampler Samples some percentage of traces, calculated deterministically using the trace ID. Any trace that would be sampled at a given percentage will also be sampled at any higher percentage. @@ -116,7 +117,7 @@ const tracerProvider = new NodeTracerProvider({ }); ``` -#### ParentBasedSampler +#### ParentBased Sampler - This is a composite sampler. `ParentBased` helps distinguished between the following cases: