Coder Social home page Coder Social logo

rudderlabs / rudder-sdk-rust Goto Github PK

View Code? Open in Web Editor NEW
3.0 13.0 5.0 73 KB

Rust SDK for RudderStack - Open-source, warehouse-first Customer Data Pipeline and Segment-alternative. It collects and routes clickstream data and builds your customer data lake on your data warehouse.

Home Page: https://www.rudderstack.com

License: Other

Rust 100.00%
rust rust-lang cdp rudderstack analytics data-synchronization product-analytics customer-data segment-alternative customer-data-pipeline

rudder-sdk-rust's Introduction

RudderStack - Customer Data Platform for Developers

Customer Data Platform for Developers


About RudderStack

RudderStack is a customer data platform for developers. Our tooling makes it easy to deploy pipelines that collect customer data from every app, website and SaaS platform, then activate it in your warehouse and business tools.

RudderStack Rust SDK

The RudderStack Rust SDK is an analytics client to track events from your Rust application. Once enabled, the event requests hit the RudderStack servers. RudderStack then transforms and routes these events to your specified destination platforms.

Questions? Start a conversation on our Slack channel.

For detailed documentation on the RudderStack Rust SDK, click here.

Getting Started with Rust SDK

Include rudderanalytics as a dependency in your Rust application Cargo.toml file:

[dependencies]
rudderanalytics = "<latest_version>"

Initializing the RudderStack Client

use rudderanalytics::client::RudderAnalytics;
use rudderanalytics::message::{Identify, Track, Page, Group, Screen, Alias, Batch, Message, BatchMessage};

let rudder_analytics = RudderAnalytics::load("YOUR_WRITE_KEY".to_string(), "YOUR_DATA_PLANE_URL".to_string());

Sending Events

Once the RudderStack client is initialized, you can use it to send your events. A sample call for track event is shown below:

use serde_json::json;

rudder_analytics.send(&Message::Track(Track {
    user_id: Some("sample_user_id".to_string()),
    event: "Test Event".to_owned(),
    properties: Some(json!({
        "some property": "some value",
        "some other property": "some other value",
    })),
    ..Default::default()
})).expect("Failed to send data to Rudderstack");

For more information on the supported calls, refer to the documentation.

Contribute

We would love to see you contribute to RudderStack. Get more information on how to contribute here.

Contact Us

For more information on any of the sections covered in this readme, you can contact us or start a conversation on our Slack channel.

Follow Us

rudder-sdk-rust's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rudder-sdk-rust's Issues

`failure` is officially deprecated/unmaintained

running cargo audit shows a dependency on the very outdated failure crate (https://lib.rs/crates/failure)

Would be good to switch to anyhow or thiserror

Crate:     failure
Version:   0.1.8
Warning:   unmaintained
Title:     failure is officially deprecated/unmaintained
Date:      2020-05-02
ID:        RUSTSEC-2020-0036
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0036
Dependency tree:
failure 0.1.8
└── rudderanalytics 1.1.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.