Skip to main content

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/start
  • POST {report_base_url}/runs/finish
  • POST {report_base_url}/logs/batch
  • POST {report_base_url}/metrics/batch
  • POST {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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naturo_telemetry_sdk-1.0.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

naturo_telemetry_sdk-1.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file naturo_telemetry_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: naturo_telemetry_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for naturo_telemetry_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 00dd3cc7ffbe7416d064188b6b31f445a8efcfdc3b121c2db4906a179da59b15
MD5 1c13925c0f9569d952d2b901b07f6641
BLAKE2b-256 672a1d88d621db8044d04983318f515feedac2f93c716e99c92d115fa777c4a4

See more details on using hashes here.

File details

Details for the file naturo_telemetry_sdk-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for naturo_telemetry_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42857efbb8bd85bb3e6684f32f5c1a538b61d44ab9733e86707f95c8ff7d8de7
MD5 5dd100919eec8d91a678b4a82603b1d7
BLAKE2b-256 878ce24f79cde15107ae924d0fc56b20b72e754d80fc5ce4a974f923ddf7264f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page