Skip to content

working directly with client (node) integrations not working. #1770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jacoor opened this issue Nov 26, 2018 · 1 comment
Closed

working directly with client (node) integrations not working. #1770

jacoor opened this issue Nov 26, 2018 · 1 comment

Comments

@jacoor
Copy link

jacoor commented Nov 26, 2018

Sentry node on AWS Lambda

Version: latest

I am trying to get integrations to work as below, but I don't get anything in console for console logs.
Please advice.

const sentry = new Sentry.NodeClient({
    dsn: sentry_url,
    integrations: Sentry.defaultIntegrations,
    debug: true
});

const hub = new Sentry.Hub(sentry);
hub.withScope(scope => {
    scope.setExtra("level", log.type);
   ....
    hub.captureMessage(log.message);
    hub.getClient().close(2000).then(function(result) {
            if (!result) {
                // timeout reached, need to log event to sendToSQS
                // https://github.com/getsentry/sentry-javascript/issues/1449#issuecomment-419352636
                callback(true);
            } else {
                callback();
            }
        }
    );
});

Thanks!

@kamilogorek
Copy link
Contributor

Duplicate of #1764
Also see this comment from Today: #1764 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants