Skip to main content

Transport for Sentry that saves failed-to-send events on disk and resends them on the next launch.

Project description

sentry-offline-transport

Ruff codecov PyPI - Version PyPI - Python Version PyPI - Downloads

Transport for Sentry that saves failed-to-send events and resends them on the next launch.

Installation

sentry-offline-trasport requires Python >= 3.8.0, sentry-sdk >= 2.0.0.

Install from PyPI using pip or any other Python package manager.

pip install sentry-offline-transport

Usage

To start using the transport, you have to provide a path to store failed events. It can be an absolute or a relative path, either a string or a Path object. If the directory doesn't exist, it will be created along with all required parent directories.

By default, the transport will try to upload previously saved events right after the initialization. You can configure this behavior using the reupload_on_startup parameter.

import sentry_sdk
from sentry_offline import make_offline_transport

sentry_sdk.init(
    dsn="https://asdf@abcd1234.ingest.us.sentry.io/1234",
    transport=make_offline_transport(
        storage_path="~/.local/share/myapp/sentry_events", 
        reupload_on_startup=False,
    ),
)

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

sentry_offline_transport-1.0.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

  • Download URL: sentry_offline_transport-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.5.0-1021-azure

File hashes

Hashes for sentry_offline_transport-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a16baacfee6795451eb0f8d2e37517108a7e20ffc3bb0e108048990c74222c9e
MD5 1df10aaaa4f8a6b2d995cacd6d48161e
BLAKE2b-256 53078a8626a31c85c9f85af4d4748dd1f838d8ff67e72da27a6cc545633796cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sentry_offline_transport-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0cd1ce1b8bc4bbe17fa813feeea259c43fff7b7ba0e50083939747ccbd4044c
MD5 dc0467f8b4dbad310f6fd45ade2e067e
BLAKE2b-256 e9185e943463dd007ad5be3e51835970e2a7e229cd46f6cb924ddf38705397ab

See more details on using hashes here.

Supported by

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