Skip to content

Commit

Permalink
[TTLG] Fix Tempo and Loki installations
Browse files Browse the repository at this point in the history
This modifies also the python scripts with the new IPs.

TODO: Integrate Tempo and Loki in the creation script.
TODO: Make Python scripts use external lib for common functions.
  • Loading branch information
rascasoft committed Jan 23, 2025
1 parent 9b3e8c8 commit 666b5ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions Through-The-Looking-Glass/Python-OpenTelemetry-Jaeger.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ to query the related traces.
Tempo installation

```console
$ kubectl create namespace tempo-test
$ kubectl create namespace tempo-system

$ cat <<EOF > helm-tempo.yml
traces:
Expand All @@ -101,13 +101,14 @@ traces:
enabled: true
EOF

$ helm -n tempo-test install --values helm-tempo.yml tempo grafana/tempo-distributed
$ helm -n tempo-system install --values helm-tempo.yml tempo grafana/tempo-distributed
...

$ kubectl -n tempo-test expose service tempo-query-frontend --name=tempo-query-frontend-lb --type=LoadBalancer
$ eval "TEMPO_FRONTEND_${CTLP}=$(kubectl -n tempo-test get svc tempo-query-frontend-lb -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}')"
$ kubectl -n tempo-system expose service tempo-query-frontend --name=tempo-query-frontend-lb --type=LoadBalancer
$ eval "TEMPO_FRONTEND_${CTLP}=$(kubectl -n tempo-system get svc tempo-query-frontend-lb -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}')"

$ kubectl -n tempo-test expose service tempo-distributor --name=tempo-distributor-lb --type=LoadBalancer
$ eval "TEMPO_DISTRIB_${CTLP}=$(kubectl -n tempo-test get svc tempo-distributor-lb -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}')"
$ kubectl -n tempo-system expose service tempo-distributor --name=tempo-distributor-lb --type=LoadBalancer
$ eval "TEMPO_DISTRIB_${CTLP}=$(kubectl -n tempo-system get svc tempo-distributor-lb -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}')"
```

Now Jaeger should be instructed to send traces to Tempo, to make this possible
Expand Down Expand Up @@ -256,7 +257,8 @@ minio:
enabled: true
EOF

$ helm install loki grafana/loki-stack --namespace loki --create-namespace --values=helm-loki.yml
$ helm install loki grafana/loki -f helm-loki.yml --create-namespace --namespace loki
...
```

Look for thist status:
Expand Down
2 changes: 1 addition & 1 deletion Through-The-Looking-Glass/alice.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#)
#trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(jaeger_exporter))
tempo_exporter = OTLPSpanExporter(
endpoint = "172.18.0.102:4317",
endpoint = "172.18.0.103:4317",
insecure = True
)
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(tempo_exporter))
Expand Down
2 changes: 1 addition & 1 deletion Through-The-Looking-Glass/cheshire.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#)
#trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(jaeger_exporter))
tempo_exporter = OTLPSpanExporter(
endpoint = "172.18.0.102:4317",
endpoint = "172.18.0.103:4317",
insecure = True
)
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(tempo_exporter))
Expand Down

0 comments on commit 666b5ad

Please sign in to comment.