A Django app to initialize Sentry client for your Django applications

Related tags

Djangodjangosentry
Overview

Dj_sentry

This Django application intialize Sentry SDK to your Django application.

How to install

You can install this packaging by using:

pip install dj_sentry

Alternatively, if you use a package manager, for example Poetry, you can use:

poetry add dj_sentry

How to configure

In your settingsfiles, add the following settings to configure the Sentry SDK according with your needs:

Setting Type Description
SENTRY_DSN str mandatory Sentry project DSN.
SENTRY_ENVIRONMENT str mandatory Environment where the application is running (for example: production, pre-production, staging)
SENTRY_APP_PACKAGE_NAME str optional Package name of your application¹.
SENTRY_EXTRA_INTEGRATIONS list optional List of Sentry integrations you want to use (in addition of the Django integration already set-up)
SENTRY_EXTRA_OPTS dict optional Dict with additionnal settings for configuring the Sentry client. See Sentry client configuration

¹: We use pkg_resources from Setuptools to get the package version of your application and send it on every events. This setting is optional but highly recommended.

By default, the setting traces_sample_rate send_default_pii have the following default values

Setting Value
traces_sample_rate 0 (no tracing samples sent to Sentry)
send_default_pii True (send user information in events)

You can change de values of those settings by using the SENTRY_EXTRA_OPTS setting. For example, to disable the setting that send user informations:

SENTRY_EXTRA_OPTS = {
    "send_default_pii": False,  # Do not send user information in Sentry events
}

Here's an example of valid configuration:

@sentry.company.com/ " SENTRY_ENVIRONMENT = "production" SENTRY_APP_PACKAGE_NAME = "company_cms" SENTRY_EXTRA_INTEGRATIONS = [RedisIntegration()] # Add Redis integration to Sentry SDK SENTRY_EXTRA_OPTS = { "before_send": before_send_filter, # Do some events filtering before sending them (see: https://docs.sentry.io/platforms/python/configuration/filtering/) } # Your Django configuration ... ">
from sentry_sdk.integrations.redis import RedisIntegration
from company_cms.utils.sentry import before_send_filter

# Your Django configuration ...

SENTRY_DSN = "https://
     
      @sentry.company.com/
      
       "
      
     
SENTRY_ENVIRONMENT = "production"
SENTRY_APP_PACKAGE_NAME = "company_cms"
SENTRY_EXTRA_INTEGRATIONS = [RedisIntegration()]  # Add Redis integration to Sentry SDK
SENTRY_EXTRA_OPTS = {
    "before_send": before_send_filter,  # Do some events filtering before sending them (see: https://docs.sentry.io/platforms/python/configuration/filtering/)
}

# Your Django configuration ...

License

This project is released under BSD-3 Clause.

You might also like...
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App 💛 We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

APIs for a Chat app. Written with Django Rest framework and Django channels.
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)

Django REST Pandas Django REST Framework + pandas = A Model-driven Visualization API Django REST Pandas (DRP) provides a simple way to generate and se

Django REST Client API

Django REST Client API Client data provider API.

Django-fast-export - Utilities for quickly streaming CSV responses to the client

django-fast-export Utilities for quickly streaming CSV responses to the client T

Get inside your stronghold and make all your Django views default login_required

Stronghold Get inside your stronghold and make all your Django views default login_required Stronghold is a very small and easy to use django app that

DCM is a set of tools that helps you to keep your data in your Django Models consistent.
DCM is a set of tools that helps you to keep your data in your Django Models consistent.

Django Consistency Model DCM is a set of tools that helps you to keep your data in your Django Models consistent. Motivation You have a lot of legacy

Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.
Django-environ allows you to utilize 12factor inspired environment variables to configure your Django application.

Django-environ django-environ allows you to use Twelve-factor methodology to configure your Django application with environment variables. import envi

Rosetta is a Django application that eases the translation process of your Django projects
Rosetta is a Django application that eases the translation process of your Django projects

Rosetta Rosetta is a Django application that facilitates the translation process of your Django projects. Because it doesn't export any models, Rosett

Comments
  • Bump django from 3.2.9 to 3.2.12

    Bump django from 3.2.9 to 3.2.12

    Bumps django from 3.2.9 to 3.2.12.

    Commits
    • fdf209e [3.2.x] Bumped version for 3.2.12 release.
    • d161335 [3.2.x] Fixed CVE-2022-23833 -- Fixed DoS possiblity in file uploads.
    • 1a1e827 [3.2.x] Fixed CVE-2022-22818 -- Fixed possible XSS via {% debug %} template tag.
    • a7e89fe [3.2.x] Added stub release notes for 3.2.12 and 2.2.27.
    • 027f4c4 [3.2.x] Added CVE-2021-45115, CVE-2021-45116, and CVE-2021-45452 to security ...
    • 0a9a46a [3.2.x] Post-release version bump.
    • 6e499a2 [3.2.x] Bumped version for 3.2.11 release.
    • 8d2f7cf [3.2.x] Fixed CVE-2021-45452 -- Fixed potential path traversal in storage sub...
    • c7fe895 [3.2.x] Fixed CVE-2021-45116 -- Fixed potential information disclosure in dic...
    • a8b32fe [3.2.x] Fixed CVE-2021-45115 -- Prevented DoS vector in UserAttributeSimilari...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(0.2.0)
  • 0.2.0(Jun 15, 2022)

    This release changed the dependencies rules in the pyproject.toml of the project to be more flexible in the allowed versions of Django you can use with this plugin.

    dj_sentry is now working with Django 4.0 projects.

    Full Changelog: https://github.com/gandi/dj_sentry/commits/0.2.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Nov 25, 2021)

Owner
Gandi
Gandi
An orgizational tool to keep track of tasks/projects and the time spent on them.

Django-Task-Manager Task Tracker using Python Django About The Project This project is an orgizational tool to keep track of tasks/projects and the ti

Nick Newton 1 Dec 21, 2021
This is a repository for collecting global custom management extensions for the Django Framework.

Django Extensions Django Extensions is a collection of custom extensions for the Django Framework. Getting Started The easiest way to figure out what

Django Extensions 6k Dec 26, 2022
Backend with Django .

BackendCode - Cookies Documentation: https://docs.djangoproject.com/fr/3.2/intro/ By @tcotidiane33 & @yaya Models Premium class Pack(models.Model): n

just to do it 1 Jan 28, 2022
Djangoblog - A blogging platform built on Django and Python.

djangoblog 👨‍💻 A blogging platform built on Django and Python

Lewis Gentle 1 Jan 10, 2022
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
This Django app will be used to host Source.Python plugins, sub-plugins, and custom packages.

Source.Python Project Manager This Django app will be used to host Source.Python plugins, sub-plugins, and custom packages. Want to help develop this

2 Sep 24, 2022
A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Django-schedule A calendaring/scheduling application, featuring: one-time and recurring events calendar exceptions (occurrences changed or cancelled)

Tony Hauber 814 Dec 26, 2022
☄️ Google Forms autofill script

lazrr 'Destroy Them With Lazers' - Knife Party, 2011 Google Forms autofill script Installation: pip3 install -r requirements.txt Usage: python3 lazrr.

Serezha Rakhmanov 12 Jun 04, 2022
A middleware to log the requests and responses using loguru.

Django Loguru The extension was based on another one and added some extra flavours. One of the biggest problems with the apps is the logging and that

Tiago Silva 9 Oct 11, 2022
Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

django-cors-headers A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django a

Adam Johnson 4.8k Jan 03, 2023
Social Media Network Focuses On Data Security And Being Community Driven Web App

privalise Social Media Network Focuses On Data Security And Being Community Driven Web App The Main Idea: We`ve seen social media web apps that focuse

Privalise 8 Jun 25, 2021
Tools to easily create permissioned CRUD endpoints in graphene-django.

graphene-django-plus Tools to easily create permissioned CRUD endpoints in graphene-django. Install pip install graphene-django-plus To make use of ev

Zerosoft 74 Aug 09, 2022
webfest Django project @innovaccer

inno-doctor webfest Django project @innovaccer setup guide create new directory for project clone the repo with url into the directory make sure pytho

Rohit sahu 6 Oct 28, 2022
Easy thumbnails for Django

Easy Thumbnails A powerful, yet easy to implement thumbnailing application for Django 1.11+ Below is a quick summary of usage. For more comprehensive

Chris Beaven 1.3k Dec 30, 2022
A Django Online Library Management Project.

Why am I doing this? I started learning 📖 Django few months back, and this is a practice project from MDN Web Docs that touches the aspects of Django

1 Nov 13, 2021
The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing for applications and libraries. An example o

pytest-dev 9.6k Jan 06, 2023
Atualizando o projeto APIs REST Django REST 2.0

APIs REST Django REST 3.0-KevinSoffa Atualização do projeto APIs REST Django REST 2.0-Kevin Soffa Melhorando e adicionando funcionalidades O que já fo

Kevin Soffa 2 Dec 13, 2022
Django-pwned - A collection of django password validators

Django Pwned A collection of django password validators. Compatibility Python: 3

Quera 22 Jun 27, 2022
Djang Referral System

Djang Referral System About | Features | Technologies | Requirements | Starting | License | Author 🎯 About I created django referral system and I wan

Alex Kotov 5 Oct 25, 2022
A modern looking portfolio build with Django.

Django Portfolio A portfolio template using html/css/js in the frontend and Django as the backend framework. Cool features: smooth scrolling responsiv

1 Jan 19, 2022