Before you begin
- You are familiar with how Sift organizes telemetry into Assets, Channels, and Runs.
How telemetry streaming works
Sift recommends the Python and Rust clients, the only Sift clients with built-in ingestion. Both stream over a persistent gRPC connection with checkpoints, retries, and optional local backups. An ingestion config registers the Asset and its Flows, the named groups of Channels you send together. You then send timestamped Flows that match the config. A Run groups the stream’s data. It is optional; without one, Sift stores the data on the Asset only. Sift sets the Run’s start and stop times from its first and last data points. To stream from another language, generate a gRPC client with Buf and build your own ingestion logic. To stream from National Instruments FlexLogger, install the Sift FlexLogger plugins.Stream telemetry
- Python
- Rust
-
From a Python environment, install the Python client with its
sift-streamextra, andpython-dotenv: -
In your project directory, create a
.envfile and add your API key and your gRPC and REST base URLs: -
In the same directory, create a
stream.pyfile. Add aSiftClientthat loads the values from the.envfile: -
Define a Flow and its Channels with
FlowConfigPy. EachChannelConfigPysets a Channel’sname,unit,data_type, anddescription: -
Set the Asset and the Run:
- In
IngestionConfigFormPy, setasset_nameto the Asset name andclient_keyto a key you reuse each time this application streams. - In
RunCreate, setnameto the Run name andclient_keyto a unique key for the Run.
- In
-
Open the stream with
create_ingestion_config_streaming_clientand send each reading as aFlowPy. Setstreaming_modeto one of the streaming modes;StreamingMode.LIVE_ONLYstreams without local backups.Open the stream once: Reuse the streaming client for the whole program. Creating a new one for each batch or loop iteration creates a new ingestion config each time, which slows streaming significantly. -
Run
stream.py. It streams until you stop it, for example with Ctrl+C.
Keep a long-running stream reliable
When a stream runs for hours or restarts partway through, keep its data in one Run and protect it from connection drops.Check the streamed telemetry
- Select Runs in the navigation, then enter the Run name in the Search box.
- In the Runs table, confirm the Run’s Asset is the right one, then click the Run.
- Click EXPLORE.
- In the Explore toolbar, click LIVE.
- In the Channels tab, confirm each Channel from your Flows appears.
- Click a Channel name to plot it.
- Confirm new points arrive at the rate you send them, with the expected units and values.
- Decide whether your data is arriving as expected, without gaps. If data is missing, verify that your data is arriving to find the affected Asset and any failed records.
What’s next
- Monitor telemetry in real time: Watch Channels update in Panels as the stream runs.
- Compare a Run against a baseline: Plot the streamed Run alongside a baseline Run to spot regressions.