Coder Social home page Coder Social logo

bugs-channel-ex's Introduction

BugsChannel

bugs channel logo

workflow

This repository contains information about handling issues with proxy. I decided to begin this project with the goal of making error handling as simple as possible. I use Sentry and Honeybadger, and both tools are fantastic for quickly tracking down issues. However, the purpose of this project is not to replace them, but rather to provide a simple solution for you to run on premise that is easy and has significant features.

I believe the project will be ready for production within the next months. ๐Ÿ™๐Ÿพ

Challenges

Done ๐Ÿ‘Œ

  • Handle Sentry events from their SDKs
  • Scrub events to avoid exposing sensitive information
  • Check for the presence of authentication keys
  • Send events to NATs
  • Get consumers (sub) and producers (pub) on board with NATS
  • Create the BugsChannel logo
  • Implement the rate-limit strategy
  • In db-less mode, define yaml as an option
  • Identify the project by the requested authentication keys
  • Adds cache strategies
  • Adds Mongo persistence and tasks to import yaml files
  • Adds Redis as an plugin alternative
  • Create a docker deployment example
  • Create an example using events and Kibana
  • Adds MongoDB as an alternative for event persistence
  • Support BugsChannel HTTP routes

TODO

  • Adds telemetry metrics with Prometheus and StatsD as options
  • Create a project diagram
  • Generate documentation with ex_doc
  • By project, implement the rate-limit strategy
  • Adds PostgreSQL as an alternative for event persistence
  • Grpc support
  • Adds Graylog as an plugin alternative
  • Adds Rabbit as a channel alternative
  • Create an example using Graylog and events
  • Create an example using events and PostgreSQL
  • Create an event user interface
  • Create a Helm Chart for Kubernetes deployments
  • Handle Honeybadger events from their SDKs
  • Handle Rollbar events from their SDKs

Running project

The command below starts a web application that listens on port 4000 by default.

# verbose mode
export LOG_LEVEL=debug

mix api
# or
mix run --no-halt

The project listens on ports 4000 (local) and 4001 (sentry). At the moment, just Sentry had been set up and you could test the following steps.

  • Create a config file named config.yml to run as dbless mode.
cp test/fixtures/settings/config.yml .config/config.yml
  • Create a file named main.py.
import sentry_sdk

sentry_sdk.init(
    "http://key@localhost:4001/1",
    traces_sample_rate=1.0,
)

raise ValueError("Error SDK")
  • Install python packages
# using venv
python -m venv .env
. .env/bin/activate
pip install sentry-sdk

# without venv
pip install --user sentry-sdk
  • Now you can run project
python main.py

Recipes

Bugs Channel dependencies are provided by Docker; use the following command: to execute dependencies such as NATS, Redis, and Mongo.

sh dev.sh

With Redis and Kibana

kibana example

There is no database persistence in this mode, and Bugs Channel acts as a proxy, handling errors and request authentication and throttling, and eventually providing metrics via Prometheus and StatsD.

 LOG_LEVEL=debug DATABASE_MODE=dbless iex -S mix api

With Mongo persistence

mongo example

If you want to save errors in the Mongo database, use the following command:

 LOG_LEVEL=debug DATABASE_MODE=mongo iex -S mix api

Any Sentry integration can be used to feed errors into MongoDB.

Events will be stored in MongoDB, and future upgrades will provide a Rest API as a backend for the Bugs Channel UI, which is the next step in creating a rich UI.

Tests

Principles: Of course, the acceptable test coverage is 100% guaranteed by the pipeline. ๐Ÿ‘Œ

mix test
# or
mix coveralls

Code Analysis

Credo is in charge of maintaining code that follows certain patterns.

mix credo -a

Containers

The file dev.sh contains a container setup for running the project locally.

With MongoDB

Running migrations

First and foremost, you must start your MongoDB server.

DATABASE_MODE=mongo mix mongo.migrate

bugs-channel-ex's People

Contributors

williampsena avatar

Stargazers

Carlos Lira avatar

Watchers

 avatar Carlos Lira avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.