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.1.0.tar.gz (11.6 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.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for naturo_telemetry_sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 20cfc0e66398051f93f839aea3dbf47f139e4600d25d9b35e2062e790f600963
MD5 86dd3f94e9def240454a1fb0e2534438
BLAKE2b-256 62d0d8524a893aa13d10c25addf7768ac5c61f55397ac52228370439edb41dc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for naturo_telemetry_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1695faf8dd641c7045b73c67758484313cc845fd585adb3fb48de327468b4e5
MD5 9d728e8e7a0d45dd110a7af8726813ba
BLAKE2b-256 4f241f24b837c1c9e89d4ab2d5518bc26a227cb29c6d701761dc348321b24732

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