GithubHelp home page GithubHelp logo

hauxir / errorpush Goto Github PK

View Code? Open in Web Editor NEW
388.0 6.0 9.0 25 KB

Minimalist Error collection Service compatible with Rollbar clients. Sentry or Rollbar alternative.

License: MIT License

Dockerfile 3.75% Python 93.53% Shell 2.72%
sentry error-handling error-reporting errors error-log rollbar rollbar-api sentry-alternative rollbar-alternative

errorpush's Introduction

Minimalist Error collection Service

Features

  • Compatible with any Rollbar client(see https://docs.rollbar.com/docs). Just change the endpoint URL to your errorpush URL.
  • Inserts all error logs into a single PostgreSQL table.

Why use this over Sentry/Rollbar?

  • Instant setup
  • Free
  • No rate limiting
  • When you don't need all the bells and whistles: just want to log all errors into a database.
  • Flexibility - use whatever you want to query the PostgresQL table for errors

Running

errorpush requires docker

docker run -p 5000:5000 -e ACCESS_TOKEN=<your_access_token_of_choice> -e POSTGRES_URI=postgres://username:[email protected]/yourdb hauxir/errorpush:latest

That's it, just set up a reverse proxy and point your rollbar client to your server.

Example Query

SELECT error_id, Max(( ( BODY ->> 'trace' ) :: jsonb ->> 'exception' ) :: jsonb ->> 'class') AS EXCEPTION, Max(( ( BODY ->> 'message' ) :: jsonb ->> 'body' )) AS message, Count(*), Max(timestamp) AS last_seen FROM   errors GROUP  BY error_id ORDER  BY last_seen DESC;
             error_id             | exception |   message    | count |         last_seen          
----------------------------------+-----------+--------------+-------+----------------------------
 8cca0a18f56269b5a5243f7cc2906f79 | NameError |              |     4 | 2021-09-08 18:34:05.751548
 b6012c1be2bef37f570077f2ce2e908b |           |              |     2 | 2021-09-08 18:15:09.944348
 5acf76ad5f327d811ca9282b5d5a933a |           | Hello world! |     3 | 2021-09-08 18:15:09.944308
 794ef3b916db810d9162ad54aff32a14 |           | HEY          |     1 | 2021-09-08 18:12:19.705926
(4 rows)

Metabase

You can use metabase to visualize the data.

Screenshot 2021-09-11 at 00 14 58

PostgreSQL view for the above image:

create view error_report as 
select 
  error_id, 
  max(
    concat(
      coalesce(
        (
          (body ->> 'trace'):: jsonb ->> 'exception'
        ):: jsonb ->> 'class', 
        'Error'
      ), 
      ': ', 
      (
        (body ->> 'trace'):: jsonb ->> 'exception'
      ):: jsonb ->> 'message', 
      (body ->> 'message'):: jsonb ->> 'body'
    )
  ) as error, 
  count(*) as occurences, 
  max(timestamp) as last_seen, 
  max(
    array_to_string(
      array(
        select 
          concat(
            el ->> 'filename', ':', el ->> 'lineno'
          ) 
        from 
          jsonb_array_elements(
            (
              (body ->> 'trace'):: jsonb ->> 'frames'
            ):: jsonb
          ) as el 
        limit 
          4
      ), 
      ', '
    )
  ) as trace, 
  max(environment) as environment, 
  max(custom ->> 'revision') as revision 
from 
  errors 
group by 
  error_id 
order by 
  last_seen desc;

errorpush's People

Contributors

hauxir avatar thenonameguy avatar

Stargazers

Triet Trinh avatar Nima HeydariNasab avatar  avatar  avatar ginokent avatar A.s. avatar Rusty avatar Caleb Albritton avatar Duiker101 avatar Di Warachet S. avatar bang-tim avatar Nikolaus Schlemm avatar Andrew Mason avatar  avatar Kazzix avatar Luca Faggianelli avatar  avatar  avatar Thomas Harr avatar  avatar toro_ponz avatar ebaker avatar 赖经纬 avatar Zac Evans avatar Thread Stone avatar Juliusz Gonera avatar Raihan Saputra avatar  avatar  avatar Motoaki Tanaka avatar Mohamad  Fazeli avatar Nex Zhu avatar Filipp Frizzy avatar Joel Hokkanen avatar Zhao Xiaohong avatar Mahmoud Rusty Abdelkader avatar Mahmoud Hashemi avatar Horace GUY avatar Richard Wöber avatar  avatar  avatar Walid Saad avatar Kevin Truong avatar Daniel Kerkow avatar  avatar Artur Czepiel avatar Syntax avatar Joris Hartog avatar Julius Peinelt avatar Eduard Carreras avatar Kristoffer Berdal avatar Yangwook Ian Jeong avatar Thiago Santos avatar Gregory avatar JungJoo Seo avatar JR Saucedo avatar Stan Sobolev avatar Nekoppoi avatar Ivan Malopinsky avatar Tizi avatar Mihai Farcas avatar  avatar Joohun, Maeng avatar foo avatar Bang Yongbae (Brice) avatar Jim Park avatar Max Lobur avatar Snehesh avatar Kain avatar Dario Castañé avatar Gang Qiu avatar Padraic Renaghan avatar Bernie avatar Zero avatar Ognyan Ivanov avatar Ike Kim avatar Jins avatar BA avatar Younguk Kim avatar 姚文强 avatar Ian Walter avatar Chris Marshall avatar Jonathan Barratt avatar Dimitar Panayotov avatar Dean Oh avatar nezz avatar Vlad Vaviloff avatar Elijah Zupancic avatar Theofanis Despoudis avatar ik5 avatar Bran Sorem avatar Sebastien Dubois avatar Josh King avatar Bob avatar Luis Eduardo Brito avatar Jaeyoung, Choi avatar 爱可可-爱生活 avatar Chaabane Jalal avatar Mark Vainomaa avatar Kennedy avatar

Watchers

Brian Rue avatar Gert Goet avatar  avatar  avatar Rinshad K Asharaf 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.