Using Sentry Client
You can use the Sentry client to send events to us. We support latest Sentry versions (Ruby 5.* etc.). You can find more information about Sentry here.
You easily using following DSN instead of Sentry's:
https://<secret>@app.errordeck.com/<project>
You can find the secret under API and integration in your project settings.
We know that Errordeck support at least these languages:
- Javascript
- Python
- Ruby
- Crystal
- PHP
But we should work with most sentry client support, except for those sending dumps.
Below is an example with Python.
Install Sentry Client
pip install sentry-sdk
Configure Sentry Client
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn="https://<secret>@app.errordeck.com/<project_id>",
integrations=[DjangoIntegration()],
)
Send Events
from sentry_sdk import capture_exception
def foo():
bar()
def bar():
try:
baz()
except Exception:
capture_exception()
Send Events with Context
from sentry_sdk import capture_exception
def foo():
bar()
def bar():
try:
baz()
except Exception:
capture_exception(context={'extra': 'context'})