getsentry / getsentry/sentry-javascript

Expecting exception when connecting to Sentry failed

Offen
#17,964 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Feature Node.js
Vorherrschende Sprache
TypeScript
Sterne
8.7k
Forks
1.8k
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
515

Beschreibung

### Is there an existing issue for this?

- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [x] I have reviewed the documentation https://docs.sentry.io/
- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

### How do you use Sentry?

Self-hosted/on-premise

### Which SDK are you using?

@sentry/node

### SDK Version

10.19.0

### Framework Version

Node 22.20.0-alpine3.22 (Docker)

### Link to Sentry event

_No response_

### Reproduction Example/SDK Setup

```
import * as Sentry from '@sentry/node';
/* <...> */
try {
console.log('[DBG] sentry init starting...');
Sentry.init({
dsn: sentryDsn,
environment: globals.RELEASE_STAGE,
sendDefaultPii: true,
});
console.log('[DBG] sentry init finished...');

console.log('[DBG] sending typo fn:');
consolee.logg('[DBG] force sentry exception');

} catch (e) {
console.error('[DBG] console error: ', e)
Sentry.captureException(e);
};

```
### Steps to Reproduce

1. Created Docker image with node app, @sentry/node imported, Sentry init'ed
2. Launched it on a machine with wrong DNS settings (in my case, my self-hosted Sentry's DNS wasn't available in my nameserver)
3. Didn't get any errors in self-hosted Sentry

### Expected Result

Expected some exceptions during connecting or error pushing to self-hosted Sentry.

### Actual Result

No errors during Sentry.init() or Sentry.captureException().
When I fixed DNS settings, I've got tracked errors in Sentry dashboard.

### Additional Context

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it.

Ready to provide more details.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.