Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

sentry-tablestore

GitHub Workflow Status PyPI License

An extension for Sentry which support Alicloud Tablestore (OTS) as a node storage backend.

Objectives

Sentry provides an abstraction called ‘nodestore’ which is used for storing key/value blobs.

It's implemented by BigTable (a service of Google Cloud Platform) in sentry.io.

But for self-hosted Sentry, it's implemented by Django default. This means the large amounts of key-value data were stored in the SQL database.

It's horrible, it can lead to rapid growth in the size of SQL database, and make it difficult to clean up.

For more details from https://forum.sentry.io/t/postgres-nodestore-node-table-124gb/12753/3 .

Therefore, this project came into being. It provides a new solution in addition to Django Database or BigTable, that is Alicloud Tablestore (OTS).

Features

  • Implement the TablestoreNodeStorage backend.
  • Support migrating data from current nodestore backend to the new one.

Prerequisites

Sentry 21.9.0 or higher.

An Tablestore instance of Alibaba Cloud (International) or Aliyun (China).

Installation

To install, simply add sentry-tablestore to your requirements.txt for your Sentry environment (or pip install sentry-tablestore).

Configuration

To configure Sentry to use this module, set sentry_tablestore.nodestore.backend.TablestoreNodeStorage to your SENTRY_NODESTORE in your sentry.conf.py, like this:

from datetime import timedelta

SENTRY_NODESTORE = 'sentry_tablestore.nodestore.backend.TablestoreNodeStorage'
SENTRY_NODESTORE_OPTIONS = {
    # Get help from https://www.alibabacloud.com/help/tablestore/latest/python-sdk-initialization
    'end_point': '',
    'access_key_id': '',
    'access_key_secret': '',
}

Then, add any applicable configuration options. Depending on your environment, and especially if you are running Sentry in containers, you might consider using python-decouple so you can set these options via environment variables.

Example Configuration

from datetime import timedelta
SENTRY_NODESTORE = 'sentry_tablestore.nodestore.backend.TablestoreNodeStorage'
SENTRY_NODESTORE_OPTIONS = {
    # Auto clean data for 90 days from its creation
    'default_ttl': timedelta(days=90),
    'automatic_expiry': True,

    # Get help from https://www.alibabacloud.com/help/tablestore/latest/python-sdk-initialization
    'end_point': 'https://sentry-self-hosted.cn-shanghai.vpc.tablestore.aliyuncs.com',
    'access_key_id': 'LTAI****************LYhz',
    'access_key_secret': 'MKs5**********************6t0J',

    # A boolean whether to enable zlib-compression, or the string "zstd" to use zstd.
    # Use zstd compression to override the default zlib for more compact and more efficient
    'compression': 'zstd'
}

# Set log-level for debugging
# Make sure LOGGING.disable_existing_loggers is set to False (in sentry/conf/server.py)
import logging
logger = logging.getLogger('sentry_tablestore.kvstore.tablestore') # Logger of this project
logger.setLevel(logging.DEBUG)
logger = logging.getLogger('tablestore-client') # Logger of Alicloud SDK
logger.setLevel(logging.DEBUG)

Bootstrap

Execute the command to bootstrap tablestore (create or update the table):

sentry upgrade --with-nodestore

Metadata

Release files for sentry-tablestore 1.0.0b2.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentry-tablestore 1.0.0b2.post1
File Size Uploaded Provenance Actions
sentry-tablestore-1.0.0b2.post1.tar.gz 11.6 kB Without provenance Details for sentry-tablestore-1.0.0b2.post1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sentry-tablestore 1.0.0b2.post1
File Interpreter ABI Platform Actions
sentry_tablestore-1.0.0b2.post1-py3-none-any.whl Python 3 none any Details for sentry_tablestore-1.0.0b2.post1-py3-none-any.whl

Total release size: 23.5 kB

Release files / sentry-tablestore-1.0.0b2.post1.tar.gz

Download URL sentry-tablestore-1.0.0b2.post1.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
450041ffa28afedddb815302d103fe53fda105e59c62bbb9d7e73ec10c6daf4b
BLAKE2b-256 checksum
How to use checksums
b3d791752895431da020150837054466e6cef862a572252aa28780e20a77f1d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.13

Release files / sentry_tablestore-1.0.0b2.post1-py3-none-any.whl

Download URL sentry_tablestore-1.0.0b2.post1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b3b0464d33b364e11a112a4f3a91dd8ac19b264623a358af0459bf78cd456c
BLAKE2b-256 checksum
How to use checksums
3cd5b651c27c431841eea012d5ee860fa72e5b7206a5da2eaad9826967f542f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.13

Security for sentry-tablestore 1.0.0b2.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page