Skip to content

robertoviola/GStreamer_OpenTelemetry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPEG-DASH Streaming Service with OpenTelemetry

This project implements an end-to-end MPEG-DASH streaming service with full observability using OpenTelemetry, Prometheus, Jaeger, and Grafana.

Project Structure

  • rust-app/: Rust application using GStreamer (dashsink2) to generate DASH content, instrumented with OpenTelemetry Tracing.
  • observability/: Docker Compose setup for OTel Collector, Prometheus, Jaeger, and Grafana.
  • node-server/: Node.js Express server (HTTPS) serving DASH content and the web player.
  • node-server/web-player/: Frontend web player using dash.js with OpenTelemetry JS Metrics instrumentation.

Prerequisites

  • GStreamer: Core library and plugins (gst-plugins-good, gst-plugins-bad, gst-plugins-ugly).
  • Rust: cargo and rustc.
  • Node.js: npm and node.
  • Docker: For running the observability stack.

Certificate Setup

To run the Node.js server with HTTPS, you need to generate a self-signed certificate in the node-server/ directory:

cd node-server
mkdir cert
openssl req -x509 -newkey rsa:4096 -keyout cert/key.pem -out cert/cert.pem -sha256 -days 365 -nodes -subj "/CN=localhost"

Getting Started

1. Start the Observability Stack

cd observability
sudo docker compose up -d

2. Start the Node.js Server

Be sure that the folder node-server/dash-content/ exists, otherwise create it. This folder is necessary to serve the DASH segments.

Install dependencies and run the server:

cd node-server
npm install
node server.js

3. Run the Rust Segmenter

cd rust-app
# Run the application with OpenTelemetry tracing enabled
cargo run

This starts generating DASH segments in node-server/dash-content/ and exports telemetry to the OTel Collector.

Observability Features

1. Server-Side (Rust Application)

  • Tracing: Visualized in Jaeger. Tracks pipeline lifecycle, state changes, and segment generation via GStreamer tracers and custom spans.

2. Client-Side (Web Player)

The dash.js player is instrumented with the OpenTelemetry JS SDK to export real-time playback metrics:

  • dash_buffer_level: Current video buffer depth (seconds).
  • dash_bitrate: Current stream bitrate (kbps), using high-accuracy representational switch monitoring.
  • dash_dropped_frames: Count of dropped frames.

Visualization Guide

Grafana Dashboards

  • URL: http://localhost:3001
  • Dashboards:
    • Dash.js Player Metrics: Visualizes playback stability, buffer levels, and bitrate switches.
  • Data Sources: Prometheus and Jaeger are automatically configured.

License

This project is licensed under the GNU Affero General Public License version 3 (AGPL-3.0). See the LICENSE file for the full text.

About

Example of monitoring a DASH streaming (GStreamer+DASH.JS) through OpenTelemetry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors