Skip to main content

sentry-deduplicate-integration

Sentry integration to rate-limit duplicated errors, using redis to sync error count and identify duplications.

Install

Install it from PyPI:

pip install sentry-deduplicate-integration

Configure

Add the integration to your sentry_sdk initialization.

import redis
from sentry_deduplicate_integration import SentryDeduplicateIntegration

sentry_sdk.init(
    integrations=[
        SentryDeduplicateIntegration(redis_factory=redis.Redis),
    ],
)

The redis_factory arg is any function returning a redis client.

For simple projects, it is possible to use it without a Redis instance, using fakeredis, which is an in-memory Redis compatible implementation. It will deduplicate only errors in the same thread.

import fakeredis
from sentry_deduplicate_integration import SentryDeduplicateIntegration

sentry_sdk.init(
    integrations=[
        SentryDeduplicateIntegration(redis_factory=fakeredis.FakeRedis),
    ],
)

What about sentry_sdk.DedupeIntegration?

The DedupeIntegration is installed by default and we expected it to work, but it just avoid duplications when the same error is triggered twice, works only in the same process and only the last error is checked for deduplication.

Metadata

Release files for sentry-deduplicate-integration 0.2.0

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-deduplicate-integration 0.2.0
File Size Uploaded
sentry_deduplicate_integration-0.2.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sentry-deduplicate-integration 0.2.0
File Interpreter ABI Platform
sentry_deduplicate_integration-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / sentry_deduplicate_integration-0.2.0.tar.gz

Download URL sentry_deduplicate_integration-0.2.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6384809f47d60e4f15cbe4f7cd3ca02c33aa8568fb649266084da9fcdae6707e
BLAKE2b-256 checksum
How to use checksums
f2ed45553101c8cf95b448e5c3a8f76b3e530bcfffd7a51356211684154b755a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.11.0 Linux/6.11.0-1018-azure

Release files / sentry_deduplicate_integration-0.2.0-py3-none-any.whl

Download URL sentry_deduplicate_integration-0.2.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdba39843431e9bf42bd45beefa4c2233d0a9fd4d672698cbf57cf9e3f8eebe8
BLAKE2b-256 checksum
How to use checksums
8f9c54c20e8a538f0729843465920217a5f059f3ffc049705eee1af55595deec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.11.0 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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