Skip to main content
After completing this workflow, you can stream telemetry from your application to Sift and watch it arrive in Explore as it is produced.

Before you begin

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

  1. From a Python environment, install the Python client with its sift-stream extra, and python-dotenv:
  2. In your project directory, create a .env file and add your API key and your gRPC and REST base URLs:
  3. In the same directory, create a stream.py file. Add a SiftClient that loads the values from the .env file:
  4. Define a Flow and its Channels with FlowConfigPy. Each ChannelConfigPy sets a Channel’s name, unit, data_type, and description:
  5. Set the Asset and the Run:
    • In IngestionConfigFormPy, set asset_name to the Asset name and client_key to a key you reuse each time this application streams.
    • In RunCreate, set name to the Run name and client_key to a unique key for the Run.
  6. Open the stream with create_ingestion_config_streaming_client and send each reading as a FlowPy. Set streaming_mode to one of the streaming modes; StreamingMode.LIVE_ONLY streams 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.
  7. 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

  1. Select Runs in the navigation, then enter the Run name in the Search box.
  2. In the Runs table, confirm the Run’s Asset is the right one, then click the Run.
  3. Click EXPLORE.
  4. In the Explore toolbar, click LIVE.
  5. In the Channels tab, confirm each Channel from your Flows appears.
  6. Click a Channel name to plot it.
  7. Confirm new points arrive at the rate you send them, with the expected units and values.
  8. 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