Skip to content

Commit

Permalink
Jaeger datasource and screenshots
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
  • Loading branch information
pavolloffay committed Oct 31, 2023
1 parent afb28a2 commit 4523317
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
11 changes: 10 additions & 1 deletion 07-correlation.md
Expand Up @@ -87,6 +87,16 @@ roleRef:
from: namespace
```

Let's create a collector with the k8s attribute processor:
```bash
kubectl apply -f https://raw.githubusercontent.com/pavolloffay/kubecon-na-2023-opentelemetry-kubernetes-metrics-tutorial/main/backend/07-collector-correlation.yaml
```

And let's see a [trace in Grafana](http://localhost:3000/grafana/explore?orgId=1&left=%7B%22datasource%22:%223Dcp0V4Ik%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22datasource%22:%7B%22type%22:%22jaeger%22,%22uid%22:%223Dcp0V4Ik%22%7D,%22queryType%22:%22search%22,%22service%22:%22backend1-deployment%22%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D)

![](./images/grafana-trace-k8s-namespace-attribute.jpg)
![](./images/grafana-metrics-k8s-namespace-attribute.jpg)

## Resource Detection Processor

The [resourcedetectionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor) can
Expand All @@ -113,7 +123,6 @@ processors:
between aggregated metric data and the original API calls where measurements are recorded.
Exemplars work for trace-metric correlation across any metric, not just those that can also be derived from Spans.


* Not all OpenTelemetry SDKs support exemplars:
* https://github.com/open-telemetry/opentelemetry-go/issues/559
* https://github.com/open-telemetry/opentelemetry-js/issues/2594
Expand Down
5 changes: 3 additions & 2 deletions app/loadgen/run.sh
@@ -1,6 +1,6 @@
#!/bin/bash

SLOWDOWN_IN_SECONDS=${SLOWDOWN_IN_SECONDS:-0.5}
SLOWDOWN_IN_SECONDS=${SLOWDOWN_IN_SECONDS:-3}
URL=${URL:-"http://frontend:4000/"}

while true;
Expand All @@ -10,7 +10,8 @@ MAX=$(($(($RANDOM%30))+10))
for i in `seq 1 ${MAX}`
do
PLAYERS=(`echo -e "Pavol\nBenedikt\nYuri\nKristina\nSeverin" | shuf`)
timeout 5 curl -s "${URL}?player1=${PLAYERS[1]}&player2=${PLAYERS[2]}" &
timeout 5 curl -s "${URL}?player1=${PLAYERS[1]}&player2=${PLAYERS[2]}" &
sleep 1
done

wait
Expand Down
11 changes: 11 additions & 0 deletions backend/01-backend.yaml
Expand Up @@ -4621,6 +4621,17 @@ data:
type: prometheus
url: http://prometheus.observability-backend.svc.cluster.local
version: 1
- access: proxy
basicAuth: false
editable: false
isDefault: false
jsonData:
disableMetricsLookup: false
httpMethod: POST
name: jaeger
type: jaeger
url: http://jaeger-query:16686
version: 1
kind: ConfigMap
metadata:
labels: {}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/grafana-trace-k8s-namespace-attribute.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4523317

Please sign in to comment.