Expand description
Rust SDK for ThinkingData — API entry.
This crate is the API entry of the ThinkingData Rust SDK: it re-exports
everything from thinkingdata_core so users depend on a single crate,
and additionally ships the thinkingdata CLI binary. All functional
logic lives in thinkingdata-core.
§Feature flags
blocking(default): synchronous API —consumer::Consumer,TDAnalytics, blocking consumer methods.async: asynchronous API — [consumer::AsyncConsumer], [TDAnalyticsAsync],*_asyncconsumer methods built on Tokio streaming pipelines.full: both of the above.
§Quick start
§Command line
The same crate name doubles as the CLI binary:
thinkingdata --log-dir /tmp/ta-logs track \
--account-id acc_1 --event-name purchase \
--properties '{"price": 9.9, "product_name": "book"}'
thinkingdata --server-url https://receiver.thinkingdata.io --app-id YOUR_APP_ID \
track --account-id acc_1 --event-name login
thinkingdata --server-url https://receiver.thinkingdata.io --app-id YOUR_APP_ID --debug \
user-set --account-id acc_1 --properties '{"vip": true}'Modules§
- cli
- The
thinkingdatacommand line interface. - consumer
- Delivery mechanisms:
consumer::Consumer, [consumer::AsyncConsumer] and the built-in log/batch/debug consumers. Delivery mechanisms forData: theConsumer/ [AsyncConsumer] traits and the three built-in consumers ported from the Go SDK. - data
- Wire-format data model and validation helpers. The wire-format data model of the ThinkingData receiver.
- error
- Wire-format data model and validation helpers. Error type shared by the whole SDK.
- log
- Diagnostics logging (
TDLogLevel, custom loggers). SDK diagnostics logging. - utils
- Wire-format data model and validation helpers. Time and validation helpers shared by the analytics facade and consumers.
Structs§
- Data
- One data point in the ThinkingData wire format.
- TDAnalytics
- The blocking analytics facade. Available with the
blockingfeature. The blocking analytics facade. Available with theblockingfeature. The blocking analytics facade of the SDK, ported from the Go SDK’sTDAnalytics.
Enums§
Constants§
- LIB_
NAME - The name of the SDK that produced the data, reported as
#lib. - SDK_
VERSION - The SDK version, reported as
#lib_versionon every event.
Traits§
- Into
Property Map - Conversion into the property map carried by
Data.
Type Aliases§
- Result
- The result type used across the SDK.