iblancasa / demo-observability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo-observability

Tools

  1. docker or podman
  2. python (tested with 3.11.5)

Start the infrastructure

# Start the OpenTelemetry Collector and the Jaeger instance
cd infrastructure && ./start.sh

Access Jaeger from your brownser: http://localhost:16686/

Install the dependencies

# Install the packages needed to run the demos
pip install -r requirements.txt

Run the demos

Automatic instrumentation

cd automatic
opentelemetry-instrument \
    --service_name my-app-using-automatic-inst \
    --traces_exporter otlp \
    --metrics_exporter otlp \
    --exporter_otlp_endpoint 0.0.0.0:4317 \
    --exporter_otlp_insecure=true \
    flask run

Manual instrumentation

cd manual
flask run

Both instrumentations

cd both
opentelemetry-instrument \
    --service_name my-app-using-both-inst \
    --traces_exporter otlp \
    --metrics_exporter otlp \
    --exporter_otlp_endpoint 0.0.0.0:4317 \
    --exporter_otlp_insecure=true \
    flask run

About

License:Apache License 2.0


Languages

Language:Python 86.3%Language:Shell 13.7%