Telemetry SDK for Naturo RPA execution logs and data reporting
Project description
naturo-telemetry-sdk
A production-oriented SDK for collecting execution logs and data records from RPA apps, then reporting them to a remote service.
Install
pip install naturo-telemetry-sdk
Quick Start
from naturo_telemetry_sdk import ObservabilitySDK, SDKConfig, AuthConfig
sdk = ObservabilitySDK.init(
SDKConfig(
app_id="3651",
app_name="xhs_creator",
app_version="1.0.0",
env="prod",
report_base_url="https://naturo-sync.example.com/api/v1/ingest",
auth=AuthConfig(type="bearer", token="your-token"),
)
)
run = sdk.start_run(task_id="task-001", platform="xiaohongshu", tags={"customer": "demo"})
sdk.log("info", "job started", step="bootstrap")
sdk.metric("records_fetched", 120)
sdk.report_records(
data_type="note",
records=[{"record_key": "note_1", "data": {"title": "hello"}}],
)
sdk.finish_run(status="success", summary={"records_fetched": 120, "records_written": 118})
sdk.shutdown()
API Endpoints Expected by SDK
POST {report_base_url}/runs/startPOST {report_base_url}/runs/finishPOST {report_base_url}/logs/batchPOST {report_base_url}/metrics/batchPOST {report_base_url}/records/batch
Each endpoint should return JSON. Any non-2xx response will be retried by the SDK.
Security
Sensitive fields are redacted by default, including: password, secret, token, cookie, authorization.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file naturo_telemetry_sdk-1.1.0.tar.gz.
File metadata
- Download URL: naturo_telemetry_sdk-1.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20cfc0e66398051f93f839aea3dbf47f139e4600d25d9b35e2062e790f600963
|
|
| MD5 |
86dd3f94e9def240454a1fb0e2534438
|
|
| BLAKE2b-256 |
62d0d8524a893aa13d10c25addf7768ac5c61f55397ac52228370439edb41dc8
|
File details
Details for the file naturo_telemetry_sdk-1.1.0-py3-none-any.whl.
File metadata
- Download URL: naturo_telemetry_sdk-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1695faf8dd641c7045b73c67758484313cc845fd585adb3fb48de327468b4e5
|
|
| MD5 |
9d728e8e7a0d45dd110a7af8726813ba
|
|
| BLAKE2b-256 |
4f241f24b837c1c9e89d4ab2d5518bc26a227cb29c6d701761dc348321b24732
|