question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error logging to Sentry

See original GitHub issue

I’m getting some errors on a task, and I can see them at the logfile, but they are not reported to Sentry.

I’m running the django management command, using this settings:

HUEY = {
    'backend': 'huey.backends.sqlite_backend',
    'name': 'broname',
    'connection': {'location': DATABASES['default']['NAME']},
    'always_eager': False,
    'consumer_options': {'workers': 1},
}

Sentry is installed and configured according to: https://raven.readthedocs.org/en/latest/integrations/django.html

Can you tell if there is some extra configuration needed?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
g-cassiecommented, Jun 3, 2015

I have huey working with Sentry. You need to add some config to the LOGGING['loggers'] in settings.py

LOGGING['loggers']['huey.consumer'] = {
  'handlers': ['sentry', 'console'],   # assuming you have a `sentry` handler defined in LOGGING['handlers']
  'level': 'INFO'
}
0reactions
coleifercommented, Jun 4, 2015

I believe @g-cassie is correct. I’m not sure the exact logging settings you need, but it should be easy since huey logs to huey.consumer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging - Sentry Documentation
event_level (default ERROR ): The Sentry Python SDK will report log records with a level higher than or equal to event_level as events....
Read more >
How to log error in catch statement in sentry - Stack Overflow
According to the docs: import * as Sentry from '@sentry/browser'; try { aFunctionThatMightFail(); } catch (err) { Sentry.
Read more >
Error logging with Sentry — Servant documentation
Error logging with Sentry¶. In this recipe we will use Sentry to collect the runtime exceptions generated by our application. We will use...
Read more >
Error logging with Sentry on Fastify - Daily.dev
Sentry provides self-hosted and cloud-based error monitoring that helps all software teams discover, triage, and prioritize errors in real-time.
Read more >
Sentry Does Not Log Errors · Issue #2419 - GitHub
In the docs, it says that placing throw new Error('This is my first Sentry Error') should send a log to sentry dashboard.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found