This demo is a sample Python app to build the collector and exercise its tracing functionality. To build and run the demo, we will need to deploy the Python app and the collector and send traces to Azure Monitor.
docker build -f Dockerfile.python . -t <name:tag>
docker push <name:tag>
kubectl delete -f python-deployment.yaml
kubectl get deployments
kubectl get pods
kubectl apply -f python-deployment.yaml
Once that has been completed, it is time to deploy the collector.
docker build -t <name:tag> .
docker push <name:tag>
kubectl delete -f omsagent-otel.yaml
kubectl get deployments
kubectl get pods
Go to omsagent-otel.yaml (in kubernetes folder), and update "image" for the otel-collector deployment to be the docker image you just built. Then, run:
kubectl apply -f omsagent-otel.yaml
Finally, it is time to emit traces and see them in Application Insights.
kubectl exec -it <name of pod> /bin/bash
Note: if the probability sampler is enabled in the otel-collector, you might not see all the spans you send (adjust this number in collector's configuration, or disable it).
curl http://localhost:5001
Now, you should be able to go under the "Investigate" tab in Azure Portal and view your traces in Application Map or in Search. Take into account that it may take up to a few minutes before the traces show up.