Hello World OTel with Exporter

chevron-rightPrerequisiteshashtag
  • Python 3.11 or higher

  • Poetry 1.8.1 or higher (recommended)

  • Docker (make sure the Docker daemon is running and you have permission to use Docker)

Note: The setup script will check if Docker is running before starting. If Docker is not running, you will see an error and instructions to start Docker.

Running OTel with Exporter Example App

circle-info

All the code used in the following examples can be found in our GitHub repository bosa-example-apps/bosa-sdk-otel-example-apparrow-up-right.

git clone https://github.com/GDP-ADMIN/bosa-example-apps.git
cd bosa-sdk-otel-example-app

▶️ Execute the script for installing and start the dependencies

./start-dependencies.sh

⬆️ This script will do the following:

  • Installing dependencies

  • Run a Docker Network (to avoid network and port issues between containers)

  • Start Jaeger for Tracing

  • Start the OTel Collector

🚀 Then run the app

poetry run python bosa_sdk_otel_example_app/main.py

🌐 After the app is running, try to hit the endpoints like curl -k http://localhost:8080/ping

this is the expected output

{"message":"pong"}

🔍 Access the Jaeger UI at http://localhost:16686 to view the telemetry data exported by the application.

🛑 Run this script for stop the running dependencies:

The key indicators of success:

  • All dependencies are successfully installed without errors.

  • The Docker Network is running smoothly, ensuring there are no network and port issues between containers.

  • Jaeger and the OTel Collector are successfully started and operational.

  • The application runs without error and responds correctly to endpoint requests.

  • When hitting the endpoint (e.g., curl -k http://localhost:8080/ping), the output is {"message":"pong"}, indicating the app is running correctly.

  • When you access the Jaeger UI at http://localhost:16686 , the telemetry data exported by the application.

Last updated