Skip to content

Commit 14bd1ca

Browse files
Anusha NarapureddyAnusha Narapureddy
authored andcommitted
add content for tail sampling section
1 parent 89ca9a0 commit 14bd1ca

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

05-sampling.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_traces_s
6464

6565
Tail sampling is where the decision to sample a trace takes place by considering all or most of the spans within the trace. Tail Sampling gives you the option to sample your traces based on specific criteria derived from different parts of a trace, which isn’t an option with Head Sampling.
6666

67+
Deploy the opentelemetry collector with `tail_sampling` enabled.
68+
69+
```shell
70+
kubectl apply -f https://raw.githubusercontent.com/pavolloffay/kubecon-eu-2024-opentelemetry-kubernetes-tracing-tutorial/backend/03-tail-sampling-config.yaml
71+
kubectl get pods -n observability-backend -w
72+
```
73+
6774
```yaml
6875
# Sample 100% of traces with ERROR-ing spans (omit traces with all OK spans)
6976
# and traces which have a duration longer than 500ms
@@ -87,11 +94,12 @@ Tail sampling is where the decision to sample a trace takes place by considering
8794
]
8895
```
8996

90-
Applying this chart will start a new collector with the tailsampling processor
97+
Backend 1 generates random errors for player 'bene', while Backend 2 introduces random delays for player 'anusha'.
98+
99+
Now let's execute some requests on the app [http://localhost:4000/?player1=bene&player2=anusha](http://localhost:4000/) and see traces in the Jaeger console [http://localhost:16686/](http://localhost:16686/).
100+
101+
<TODO: Add screenshot>
91102

92-
```shell
93-
kubectl apply -f https://raw.githubusercontent.com/pavolloffay/kubecon-eu-2024-opentelemetry-kubernetes-tracing-tutorial/backend/03-tail-sampling-config.yaml
94-
```
95103

96104
-----
97105
### Advanced Topic: Sampling at scale with OpenTelemetry

0 commit comments

Comments
 (0)