Skip to main content
Cloud logs can be sent with Python SDK, Node.js SDK, or direct HTTP. Use ALERT for high-priority incidents. Disable SDK cloud forwarding with ALSHIVAL_CLOUD_LEVEL=NONE. Use the DevTools Resource Details page’s Resource URL as ALSHIVAL_RESOURCE for targeting. This supports both owned and shared resources. Supported cloud forwarding levels: DEBUG, INFO, WARNING, ERROR, ALERT, NONE.

Payload format

{
  "logs": [
    {
      "level": "alert",
      "message": "payment queue backed up",
      "ts": "2026-02-22T00:00:00+00:00",
      "extra": {
        "queue": "payments",
        "depth": 921,
        "region": "us-central"
      }
    }
  ]
}

SDK examples

import alshival

alshival.configure(
    username='your_username',
    api_key='your_api_key',
    resource='https://alshival.dev/u/resource_owner_username/resources/resource_uuid/',
    cloud_level='INFO',
)

alshival.log.info('worker online')
alshival.log.alert('cpu sustained above 95%', extra={'host': 'worker-2'})

Common error codes

  • 400 invalid_json: malformed JSON payload
  • 400 invalid_resource: username/resource mismatch
  • 401 invalid_credentials: invalid or revoked key
  • 403 forbidden: authenticated but not authorized