Sign inSign up

qnib/sentry

By qnib

•Updated about 9 years ago

QNIBTerminal image to use sentry

Image
0

2.6K

qnib/sentry repository overview

⁠docker-sentry

QNIBTerminal sentry image

⁠Start it

To try it out just start the stack...

$ docker-compose up -d

And log in with [email protected] (password: admin).

⁠Hello World

To see how this works, I created a small python snippet.

$ cat example/python/test.py
import raven
import os

client = raven.Client(
    dsn=os.environ['SENTRY_DNS']

    # inform the client which parts of code are yours
    # include_paths=['my.app']
    # include_paths=[__name__.split('.', 1)[0]],

    # pass along the version of your application
    # release='1.0.0'
    # release=raven.fetch_package_version('my-app')
    # release=raven.fetch_git_sha(os.path.dirname(__file__)),
)

# capture a simple message
client.captureMessage('hello world!')

# Catch an exception
try:
    1 / 0
except ZeroDivisionError:
    client.captureException()

The SENTRY_DNS entry has to be changed according to the client key in the sentry server.

⁠Click on the Internal project

⁠Go to settings

⁠Copy the client key

⁠Change the script and fire it up

By exporting the key as SENTRY_DNS, it will be used within the little test script.

$ export SENTRY_DNS=http://7a6efbe582564567a4acb335ccf633d7:[email protected]:9000/1
$ python example/python/test.py
$

This turns out in the project just like fine:

Tag summary

Content type

Image

Digest

sha256:9d4ffc5c4…

Size

1 GB

Last updated

about 9 years ago

docker pull qnib/sentry