Skip to main content

Overview

Sift provides official client libraries for Python, Rust, and Go to simplify integration with its APIs. In this tutorial, you will use the Sift Stream Rust library to stream telemetry from a Rust application into Sift. You will run a simple example that simulates a robotic vehicle reporting both velocity and temperature in real time, and see how that telemetry appears in Sift. By the end of this tutorial, you will understand how to install the Sift Stream Rust library, configure authentication, define telemetry signals, and stream time series data into Sift using Rust.

Prerequisites

Scenario

In this tutorial, you will simulate a simple system that produces telemetry. Imagine a robotic vehicle reporting both its current speed and its internal temperature every half second. Instead of connecting to real hardware, the Rust application generates mock velocity and temperature values and streams them to Sift in real time. Each time you run the application, it creates a new Asset and starts a new session for collecting telemetry. The program sends velocity and temperature measurements every 0.5 seconds. You will view this telemetry in Sift and see how multiple Channels are grouped within a single Run, and more importantly, learn how to structure a Rust application using the Sift Rust client library to stream telemetry into Sift.

Step 1: Obtain the Rust example project

First, clone the Sift repository, which contains the Rust streaming ingestion example used in this tutorial. Next, navigate to the sift_stream crate directory:
git clone https://github.com/sift-stack/sift.git
cd sift/rust/crates/sift_stream
This directory contains the Cargo.toml file for the streaming client library and the example program used in this tutorial.

Step 2: Configure authentication

Now that you are in the sift_stream crate directory, configure authentication so the Rust example can connect to your Sift environment. The application reads credentials from environment variables using a .env file. Create a .env file in the root of the sift_stream directory (the same directory that contains Cargo.toml) and add the following values, replacing them with the ones from your Sift environment:
touch .env
SIFT_API_KEY=your_api_key_here
SIFT_GRPC_URL=https://your-grpc-url

Step 3: Run the application and view streamed data in Sift

In this step, you will run the Rust example from your terminal and then open Sift to observe the newly created Asset, Run, and Channels. As the application runs, velocity and temperature measurements will be streamed to Sift every 0.5 seconds.
  1. From the sift_stream directory (the folder containing Cargo.toml), run the example:
    cargo run --example ingestion-tutorial
    
    The example streams telemetry for approximately 10 minutes before shutting down automatically. If you want to stop the program earlier, press Ctrl + C in your terminal.
  2. In Sift, locate the Run name or description field and enter the Run name generated by the application (for example, robot_vehicle_…_run).
  3. In the Runs table, click the Run name.
  4. Click Explore 2.
  5. Click Live.
  6. In the Channels tab, select the following Channels:
    • temperature
    • velocity

Step 4: Understand the ingestion workflow

Now that the example is running and streaming telemetry to Sift, let’s examine how the Rust application works. The example program used in this tutorial is located at:
examples/ingestion-tutorial/main.rs
The ingestion process follows a clear sequence. The steps below summarize how telemetry is structured, configured, and streamed to Sift.
1

Configure authentication and initialize the streaming client

The application begins by loading authentication credentials from the .env file using dotenvy. These values are used to create a Credentials configuration that allows the client to authenticate with your Sift environment.A streaming client is then initialized using SiftStreamBuilder, which establishes the ingestion connection and prepares the client to send telemetry.
2

Define the telemetry schema

Telemetry sent to Sift must follow a defined schema. In this example, a FlowConfig defines the telemetry structure, and each ChannelConfig represents an individual signal. Two Channels are defined: velocity and temperature. These Channels are grouped together within a Flow named vehicle_metrics.
3

Create the ingestion context

An IngestionConfigForm associates the telemetry schema with an Asset and a unique client key. A RunForm then defines the session that groups incoming telemetry.The Run is created as part of the same streaming ingestion session initialized by SiftStreamBuilder. This means the Run is established on the same connection used to send telemetry data.
4

Stream timestamped telemetry to Sift

Once the ingestion context is established, the application begins generating mock telemetry values and sending them to Sift using sift_stream.send(). Each message is sent as a Flow containing:
  • a timestamp
  • the Flow name
  • values for each Channel
After the loop completes, the program calls finish() to ensure any queued telemetry is transmitted before the streaming session closes.

Conclusion

In this tutorial, you learned how to stream live telemetry to Sift using the Sift Rust client library. You configured authentication, defined a telemetry schema using FlowConfig and ChannelConfig, created an Asset and Run, and opened a streaming ingestion session to send timestamped flows in real time. You also saw how streamed data appears in Sift and how Channels are organized within a Run. With this foundation, you can adapt the same ingestion pattern to real systems instead of simulated data. By defining clear flow schemas and using the streaming ingestion API correctly, you can integrate Sift into production pipelines and continuously stream structured time series telemetry into your environment.