Kent - Fake Sentry server for local development, debugging, and integration testing

Related tags

Testingkent
Overview

Kent

Kent is a service for debugging and integration testing Sentry.

Code: https://github.com/willkg/kent/
Issues: https://github.com/willkg/kent/issues
License: MPL v2

Goals

Goals of Kent:

  1. make it possible to debug before_send and before_breadcrumb sanitization code when using sentry-sdk
  2. make it possible to debug other sentry error submission payload issues
  3. make it possible to write integration tests against a fake sentry instance

Quick start

Installing and running on your local machine

  1. Install Kent.

    You can install Kent from PyPI with pipx or pip or whatever:

    pipx install kent
    

    You can install a REVISH ("main", branch name, commit, whatever) from GitHub:

    pipx install https://github.com/willkg/kent/archive/refs/heads/
        .zip
    
       

    You can install from a checked out version of this repository:

    pipx install .
    
  2. Run Kent:

    kent-server run [-h HOST] [-p PORT]
    

Running in a Docker container

I'm using something like this:

FROM python:3.10.1-alpine3.15

WORKDIR /app/

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1

RUN pip install -U 'pip>=8' && \
    pip install --no-cache-dir 'kent==VERSION'

USER guest

ENTRYPOINT ["/usr/local/bin/kent-server"]
CMD ["run"]

Replace VERSION with the version of Kent you want to use. See https://pypi.org/project/kent for releases.

Then:

$ docker build -t faksentry:latest .
$ docker run --rm --publish 8000:8000 fakesentry:latest run --host 0.0.0.0 --port 8000

Things to know about Kent

Kent is the fakest of fake Sentry servers. It supports a single Sentry project with id 1. You can set up a Sentry DSN to point to Kent and have your application send errors.

Kent is a refined fake Sentry service and doesn't like fast food.

Kent will keep track of the last 100 it received in memory. Nothing is persisted to disk.

You can access the list of errors and error data with your web browser by going to Kent's index page.

You can also access it with the API. This is most useful for integration tests that want to assert things about errors.

/api/errorlist/
List of all errors in memory with a unique error id.
/api/error/ERRORID
Retrieve the payload for a specific error by id.
/api/flush/
Flushes the error manager of all errors.

Kent definitely works with:

  • Python sentry-sdk client

I don't know about anything else. If you use Kent with another Sentry client, add an issue with details or a pull request to update the README.

Release process

  1. Check out main tip.

  2. Update __version__ in src/kent/__init__.py.

  3. Run:

    $ make checkrot
    $ make test
    $ make testdocker
    $ check-manifest
    

    Fix any issues from that.

  4. Update HISTORY.rst.

  5. Push any changes to GitHub.

  6. Release:

    $ git tag --sign 1.0.0
    # Use contents from HISTORY.rst for tag comment
    
    $ make clean
    $ python setup.py sdist bdist_wheel
    $ twine upload dist/*
    
Owner
Will Kahn-Greene
he/him; crash ingestion, python tools, etc
Will Kahn-Greene
Webscreener is a tool for mass web domains pentesting.

Webscreener is a tool for mass web domains pentesting. It is used to take snapshots for domains that is generated by a tool like knockpy or Sublist3r. It cuts out most of the pentesting time by scree

Seekurity 3 Jun 07, 2021
Ab testing - The using AB test to test of difference of conversion rate

Facebook recently introduced a new type of offer that is an alternative to the current type of bidding called maximum bidding he introduced average bidding.

5 Nov 21, 2022
The successor to nose, based on unittest2

Welcome to nose2 nose2 is the successor to nose. It's unittest with plugins. nose2 is a new project and does not support all of the features of nose.

736 Dec 16, 2022
User-oriented Web UI browser tests in Python

Selene - User-oriented Web UI browser tests in Python (Selenide port) Main features: User-oriented API for Selenium Webdriver (code like speak common

Iakiv Kramarenko 575 Jan 02, 2023
Ab testing - basically a statistical test in which two or more variants

Ab testing - basically a statistical test in which two or more variants

Buse Yıldırım 5 Mar 13, 2022
A automated browsing experience.

browser-automation This app is an automated browsing technique where one has to enter the required information, it's just like searching for Animals o

Ojas Barawal 3 Aug 04, 2021
Front End Test Automation with Pytest Framework

Front End Test Automation Framework with Pytest Installation and running instructions: 1. To install the framework on your local machine: clone the re

Sergey Kolokolov 2 Jun 17, 2022
Getting the most out of your hobby servo

ServoProject by Adam Bäckström Getting the most out of your hobby servo Theory The control system of a regular hobby servo looks something like this:

209 Dec 20, 2022
A set of pytest fixtures to test Flask applications

pytest-flask An extension of pytest test runner which provides a set of useful tools to simplify testing and development of the Flask extensions and a

pytest-dev 433 Dec 23, 2022
Automação de Processos (obtenção de informações com o Selenium), atualização de Planilha e Envio de E-mail.

Automação de Processo: Código para acompanhar o valor de algumas ações na B3. O código entra no Google Drive, puxa os valores das ações (pré estabelec

Hemili Beatriz 1 Jan 08, 2022
A toolbar overlay for debugging Flask applications

Flask Debug-toolbar This is a port of the excellent django-debug-toolbar for Flask applications. Installation Installing is simple with pip: $ pip ins

863 Dec 29, 2022
Object factory for Django

Model Bakery: Smart fixtures for better tests Model Bakery offers you a smart way to create fixtures for testing in Django. With a simple and powerful

Model Bakers 632 Jan 08, 2023
Donors data of Tamil Nadu Chief Ministers Relief Fund scrapped from https://ereceipt.tn.gov.in/cmprf/Interface/CMPRF/MonthWiseReport

Tamil Nadu Chief Minister's Relief Fund Donors Scrapped data from https://ereceipt.tn.gov.in/cmprf/Interface/CMPRF/MonthWiseReport Scrapper scrapper.p

Arunmozhi 5 May 18, 2021
nose is nicer testing for python

On some platforms, brp-compress zips man pages without distutils knowing about it. This results in an error when building an rpm for nose. The rpm bui

1.4k Dec 12, 2022
automate the procedure of 403 response code bypass

403bypasser automate the procedure of 403 response code bypass Description i notice a lot of #bugbountytips describe how to bypass 403 response code s

smackerdodi2 40 Dec 16, 2022
Percy visual testing for Python Selenium

percy-selenium-python Percy visual testing for Python Selenium. Installation npm install @percy/cli: $ npm install --save-dev @percy/cli pip install P

Percy 9 Mar 24, 2022
A Simple Unit Test Matcher Library for Python 3

pychoir - Python Test Matchers for humans Super duper low cognitive overhead matching for Python developers reading or writing tests. Implemented in p

Antti Kajander 15 Sep 14, 2022
Android automation project with pytest+appium

Android automation project with pytest+appium

1 Oct 28, 2021
Test django schema and data migrations, including migrations' order and best practices.

django-test-migrations Features Allows to test django schema and data migrations Allows to test both forward and rollback migrations Allows to test th

wemake.services 382 Dec 27, 2022
WomboAI Art Generator

WomboAI Art Generator Automate AI art generation using wombot.art. Also integrated into SnailBot for you to try out. Setup Install Python Go to the py

nbee 7 Dec 03, 2022