Skip to content
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

Sentry.captureException doesn't seem to send my context #1213

Closed
5 of 11 tasks
lucasriondel opened this issue Nov 23, 2020 · 2 comments
Closed
5 of 11 tasks

Sentry.captureException doesn't seem to send my context #1213

lucasriondel opened this issue Nov 23, 2020 · 2 comments

Comments

@lucasriondel
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 2.0.2

react-native version: 0.63.2

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

https://sentry.io/organizations/lonestone/issues/2050084236/?project=5525775&query=is%3Aunresolved

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://[email protected]/...'
});

I have following issue:

While capturing an exception, I am setting extra context to have additionnal data to have a better analysis on my error. But I do not know why they do not appear on sentry.io

Steps to reproduce:

Sentry.captureException(e, {
    tags: {
        screen: Routes.AccountProCreationForm,
        step: step,
        email: email,
    },
    contexts: {
        formContext: {
            step1: {
            name,
            surname,
            phone,
            email,
            password,
            address,
            zipcode,
            city,
            },
            step2: {
            description,
            googleUrl,
            profilePicture,
            diplomas,
            insuranceNumber,
            },
        },
    },
});

There's a console.log right before the captureException call logging the content of formContext, and everything is right, but there's anything on Sentry.io's console. Tags are well sent though.

Actual result:

image

Expected result:

I was expecting to see my values :<

@jennmueng
Copy link
Member

Hmm can you please do

const captureContext = {
    tags: {
        screen: Routes.AccountProCreationForm,
        step: step,
        email: email,
    },
    contexts: {
        formContext: {
            step1: {
            name,
            surname,
            phone,
            email,
            password,
            address,
            zipcode,
            city,
            },
            step2: {
            description,
            googleUrl,
            profilePicture,
            diplomas,
            insuranceNumber,
            },
        },
    },
}

const eventId = Sentry.captureException(e, captureContext)
console.log(eventId, captureContext)

and paste the logs of the eventId and captureContext, thanks. And please replace any sensitive data if there are any.

@jennmueng
Copy link
Member

I will be closing this for now as there seems to be no updates. Please let me know if the issue still persists.

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

No branches or pull requests

2 participants