sentry-offline-transport


Namesentry-offline-transport JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryTransport for Sentry that saves failed-to-send events on disk and resends them on the next launch.
upload_time2024-06-02 18:13:06
maintainerNone
docs_urlNone
authorRoman Vlasenko
requires_python<4.0,>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sentry-offline-transport
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![codecov](https://codecov.io/gh/Klavionik/sentry-offline-transport/graph/badge.svg?token=L5GROOX2QN)](https://codecov.io/gh/Klavionik/sentry-offline-transport)
[![PyPI - Version](https://img.shields.io/pypi/v/sentry-offline-transport)](https://pypi.org/project/sentry-offline-transport)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sentry-offline-transport)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/sentry-offline-transport)](https://pypistats.org/packages/sentry-offline-transport)

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.

```python
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,
    ),
)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sentry-offline-transport",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Roman Vlasenko",
    "author_email": "klavionik@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/53/07/8a8626a31c85c9f85af4d4748dd1f838d8ff67e72da27a6cc545633796cc/sentry_offline_transport-1.0.0.tar.gz",
    "platform": null,
    "description": "# sentry-offline-transport\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![codecov](https://codecov.io/gh/Klavionik/sentry-offline-transport/graph/badge.svg?token=L5GROOX2QN)](https://codecov.io/gh/Klavionik/sentry-offline-transport)\n[![PyPI - Version](https://img.shields.io/pypi/v/sentry-offline-transport)](https://pypi.org/project/sentry-offline-transport)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sentry-offline-transport)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/sentry-offline-transport)](https://pypistats.org/packages/sentry-offline-transport)\n\nTransport for Sentry that saves failed-to-send events and resends them on the next launch.\n\n## Installation\n`sentry-offline-trasport` requires Python >= 3.8.0, sentry-sdk >= 2.0.0.\n\nInstall from PyPI using `pip` or any other Python package manager.\n\n`pip install sentry-offline-transport`\n\n## Usage\nTo start using the transport, you have to provide a path to store failed events. It can be\nan absolute or a relative path, either a string or a `Path` object. If the directory doesn't exist, \nit will be created along with all required parent directories.\n\nBy default, the transport will try to upload previously saved events right after the initialization.\nYou can configure this behavior using the `reupload_on_startup` parameter.\n\n```python\nimport sentry_sdk\nfrom sentry_offline import make_offline_transport\n\nsentry_sdk.init(\n    dsn=\"https://asdf@abcd1234.ingest.us.sentry.io/1234\",\n    transport=make_offline_transport(\n        storage_path=\"~/.local/share/myapp/sentry_events\", \n        reupload_on_startup=False,\n    ),\n)\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Transport for Sentry that saves failed-to-send events on disk and resends them on the next launch.",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9185e943463dd007ad5be3e51835970e2a7e229cd46f6cb924ddf38705397ab",
                "md5": "dc0467f8b4dbad310f6fd45ade2e067e",
                "sha256": "b0cd1ce1b8bc4bbe17fa813feeea259c43fff7b7ba0e50083939747ccbd4044c"
            },
            "downloads": -1,
            "filename": "sentry_offline_transport-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc0467f8b4dbad310f6fd45ade2e067e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5559,
            "upload_time": "2024-06-02T18:13:05",
            "upload_time_iso_8601": "2024-06-02T18:13:05.690266Z",
            "url": "https://files.pythonhosted.org/packages/e9/18/5e943463dd007ad5be3e51835970e2a7e229cd46f6cb924ddf38705397ab/sentry_offline_transport-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "53078a8626a31c85c9f85af4d4748dd1f838d8ff67e72da27a6cc545633796cc",
                "md5": "1df10aaaa4f8a6b2d995cacd6d48161e",
                "sha256": "a16baacfee6795451eb0f8d2e37517108a7e20ffc3bb0e108048990c74222c9e"
            },
            "downloads": -1,
            "filename": "sentry_offline_transport-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1df10aaaa4f8a6b2d995cacd6d48161e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 4047,
            "upload_time": "2024-06-02T18:13:06",
            "upload_time_iso_8601": "2024-06-02T18:13:06.955593Z",
            "url": "https://files.pythonhosted.org/packages/53/07/8a8626a31c85c9f85af4d4748dd1f838d8ff67e72da27a6cc545633796cc/sentry_offline_transport-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-02 18:13:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sentry-offline-transport"
}
        
Elapsed time: 0.47923s