A simple pipeline demonstrating the use of OpenTelemetry in Savant. The pipeline contains one element, Blur PyFunc. It applies gaussian blur to the frame and contains OpenTelemetry instrumenting code. OpenTelemetry instrumenting is initialized with environment variables: see compose files for details. The telemetry is collected by the all-in-one Jaeger container. The container also includes the Jaeger UI.
Below are a few screenshots from the Jaeger UI.
Select telemetry-demo
Service and click Find Traces to see captured traces.
Click on a trace to see the trace spans, associated logging messages, events and attributes.
The process-frame
span is the parent span for blurring code located in the Blur PyFunc.
The blur-filter
span is a telemetry span for the blur function call.
The error-code
span demonstrates the span capability of attaching uncaught exceptions to the span.
git clone https://github.com/insight-platform/Savant.git
cd Savant
git lfs pull
./utils/check-environment-compatible
Note: Ubuntu 22.04 runtime configuration guide helps to configure the runtime to run Savant pipelines.
# you are expected to be in Savant/ directory
# if x86
docker compose -f samples/telemetry/docker-compose.x86.yml up
# if Jetson
docker compose -f samples/telemetry/docker-compose.l4t.yml up
# open 'rtsp://127.0.0.1:554/stream/0' in your player
# or visit 'http://127.0.0.1:888/stream/0/' (LL-HLS)
# navigate to 'http://localhost:16686' to access the Jaeger UI
# Ctrl+C to stop running the compose bundle
Jaeger and Savant support TLS for telemetry collection. docker-compose-with-tls.x86.yml and docker-compose-with-tls.l4t.yml compose files demonstrate how to run Jaeger with TLS enabled (for both Jaeger and Savant authentication).
Create directory for certificates:
mkdir samples/telemetry/certs
Generate CA:
openssl genpkey -algorithm RSA -out samples/telemetry/certs/ca.key
openssl req -new -x509 -days 365 \
-key samples/telemetry/certs/ca.key \
-out samples/telemetry/certs/ca.crt \
-subj "/CN=jaeger-ca"
Generate server key and certificate:
openssl genpkey -algorithm RSA -out samples/telemetry/certs/server.key
openssl req -new \
-key samples/telemetry/certs/server.key \
-out samples/telemetry/certs/server.csr \
-subj "/CN=jaeger"
openssl x509 -req -days 365 \
-in samples/telemetry/certs/server.csr \
-CA samples/telemetry/certs/ca.crt \
-CAkey samples/telemetry/certs/ca.key \
-CAcreateserial \
-out samples/telemetry/certs/server.crt \
-extfile <(echo "subjectAltName=DNS:jaeger")
Make the server key readable by the container:
chmod +r samples/telemetry/certs/server.key
Generate client key and certificate:
openssl genpkey -algorithm RSA -out samples/telemetry/certs/client.key
openssl req -new \
-key samples/telemetry/certs/client.key \
-out samples/telemetry/certs/client.csr \
-subj "/CN=module"
openssl x509 -req -days 365 \
-in samples/telemetry/certs/client.csr \
-CA samples/telemetry/certs/ca.crt \
-CAkey samples/telemetry/certs/ca.key \
-CAcreateserial \
-out samples/telemetry/certs/client.crt
# you are expected to be in Savant/ directory
# if x86
docker compose -f samples/telemetry/docker-compose-with-tls.x86.yml up
# if Jetson
docker compose -f samples/telemetry/docker-compose-with-tls.l4t.yml up
# open 'rtsp://127.0.0.1:554/stream/0' in your player
# or visit 'http://127.0.0.1:888/stream/0/' (LL-HLS)
# navigate to 'http://localhost:16686' to access the Jaeger UI
# Ctrl+C to stop running the compose bundle