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.

Events getting silently dropped

See original GitHub issue

How do you use Sentry?

Sentry Saas (sentry.io)

Version

1.5.6

Steps to Reproduce

Unfortunately I haven’t figured out how to reproduce this. 99.9% of errors (not a real stat) get sent as expected. It seems to happen randomly. I am logging exceptions to a custom logger in the before_send function like this, followed by my init call:

import traceback

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.redis import RedisIntegration

sentry_sent_logger = logging.getLogger('sentry-sent')


def before_send(event, hint):
    tb = '\n'.join(traceback.format_tb(hint['exc_info'][2]))
    log_str = f'\ntraceback: {tb}\n-----'

    sentry_sent_logger.info(log_str)
    return event


sentry_sdk.init(
    dsn=env.get_sentry_io_url(),
    integrations=[DjangoIntegration(), FlaskIntegration(), RedisIntegration()],
    debug=True,
    traces_sample_rate=0.0,
    send_default_pii=True,
    before_send=before_send
)

I am always returning the event from before_send. At 04:07 EST this morning a stack trace of an exception was written to my logs by the sentry_sent_logger. This error does not exist in my sentry.io UI.

I have been running with debug=True since I have noticed this happening before. Below are the sentry_sdk logs at the same time. There is nothing logged by sentry_sdk at the time of the dropped exception.

2022-04-08 00:04:04,682 - sentry_sdk.errors - DEBUG - [Tracing] Discarding <http.server> transaction <generic WSGI request> because traces_sample_rate is set to 0
2022-04-08 00:04:04,684 - sentry_sdk.errors - DEBUG - Discarding transaction because sampled = False
2022-04-08 00:04:04,684 - sentry_sdk.errors - INFO - Discarded session update because of missing release
2022-04-08 00:04:06,275 - sentry_sdk.errors - DEBUG - [Tracing] Discarding <http.server> transaction <generic WSGI request> because traces_sample_rate is set to 0
2022-04-08 00:04:06,277 - sentry_sdk.errors - DEBUG - Discarding transaction because sampled = False
2022-04-08 00:04:06,277 - sentry_sdk.errors - INFO - Discarded session update because of missing release
2022-04-08 00:04:10,850 - sentry_sdk.errors - DEBUG - [Tracing] Discarding <http.server> transaction <generic WSGI request> because traces_sample_rate is set to 0
2022-04-08 00:04:10,852 - sentry_sdk.errors - DEBUG - Discarding transaction because sampled = False
2022-04-08 00:04:10,852 - sentry_sdk.errors - INFO - Discarded session update because of missing release

I honestly cannot figure out what is happening. I have to assume something is happening between the before_send function and the event actually sending. Please let me know if you need more info.

Expected Result

Sentry sends the errors to sentry.io.

Actual Result

Sentry does not send the errors to sentry.io.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sl0thentr0pycommented, May 30, 2022

@blaketeres exposing these stats to the end user is on the product roadmap, but I can’t give you an ETA on when that will be shipped unfortunately.

here’s a couple of days in the last week, you still have a lot of Network Errors.

image image
1reaction
blaketerescommented, Apr 8, 2022

Also as a side note, it is advised to contact support in such cases. Github is mainly intended for issues/bugs/feature requests.

Thanks for looking into this. I assumed it was an issue with the client. I’ll contact support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Emails to Microsoft 365 customers are silently dropped
Emails to Microsoft 365 customers are silently dropped. Hi! We run a SaaS customer communication tool called Flixcheck.
Read more >
Single Thread Executor Silently Drops Tasks - Stack Overflow
The tasks can get queued up in the executor thread and take as long as they need to execute. The traffic is bursty...
Read more >
ISE silently dropping packet - Cisco Community
I'm hitting this weird issue with ISE trying to get EAP-TLS with machine authentication working. During the initial eap-tls flow, ISE receives the...
Read more >
Response Policies | Silent Drop | HAProxy Enterprise 2.6r1
You can silently drop a client's HTTP request, which disconnects immediately without notifying the client that the connection has been closed.
Read more >
7 Behaviors That Reveal Someone Is Silently Depressed
Those who suffer silently and choose not to get help out of embarrassment, shame, ... Increased or decreased appetite is a common symptom...
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