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

Missing sendDefaultPii type from options #2163

Closed
4 of 8 tasks
daaain opened this issue Jul 11, 2019 · 8 comments
Closed
4 of 8 tasks

Missing sendDefaultPii type from options #2163

daaain opened this issue Jul 11, 2019 · 8 comments

Comments

@daaain
Copy link

daaain commented Jul 11, 2019

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

5.5.0

Description

The option sendDefaultPii does not exist in types (in fact I can not find it in this repo at all apart from being mentioned in one unrelated issue), so I'm getting a TypeScript error.

Also, is it the replacement for the previous parseUser property? The documentation is very vague, not even listing which fields will it pick, but only saying certain personally identifiable information is added.

I guess some other fields might be missing too, which was masked by having a catch-all field earlier, which is now removed by #2111

@kamilogorek
Copy link
Contributor

sendDefaultPii is not a thing in our JS SDKs, see: https://docs.sentry.io/error-reporting/configuration/?platform=javascript

image

Also, is it the replacement for the previous parseUser property?

Yes, however as you already mentioned, it's not very well documented, sorry for that.

/**
* Enriches passed event with request data.
*
*
* @param event Will be mutated and enriched with req data
* @param req Request object
* @param options object containing flags to enable functionality
* @hidden
*/
export function parseRequest(
event: Event,
req: {
[key: string]: any;
},
options?: {
request?: boolean;
serverName?: boolean;
transaction?: boolean | TransactionTypes;
user?: boolean | string[];
version?: boolean;
},
): Event {

If you use express or any other framework making use of our handlers Sentry.Handlers.requestHandler:

app.use(Sentry.Handlers.requestHandler({
  user: ['keys', 'to', 'attach', 'with', 'the', 'event']
})

However, if you use SDK with raw node app, then we don't collect that data at all.

The documentation is very vague, not even listing which fields will it pick, but only saying certain personally identifiable information is added.

Agree, we can definitely make it better.

Cheers!

@daaain
Copy link
Author

daaain commented Jul 12, 2019

First I thought I'm going crazy, but apparently if you choose Node rather than Javascript it's not showing up as not available: https://docs.sentry.io/error-reporting/configuration/?platform=node

image

But this repo is the place for the unified JS client including Node, right?

Anyway, adding the config to the requestHandler solves the problem for me.

Thanks a lot for the help and explanation!

@kamilogorek
Copy link
Contributor

First I thought I'm going crazy, but apparently if you choose Node rather than Javascript it's not showing up as not available: https://docs.sentry.io/error-reporting/configuration/?platform=node

Oh snap, that's a bug then! Will fix it, thanks!

But this repo is the place for the unified JS client including Node, right?

Correct :)

Thanks a lot for the help and explanation!

Glad it helped! Cheers

@kamilogorek
Copy link
Contributor

Related: getsentry/sentry-docs#1111

@kamilogorek
Copy link
Contributor

Also updated current docs for handlers getsentry/sentry-docs#1093

@bytenik
Copy link

bytenik commented Dec 29, 2020

Still not showing up for nodejs; I just hit this today.

@filips123
Copy link
Contributor

It seems something has changed, so warning is missing again, both on JavaScript and Node.js docs.

@tianjianjiang
Copy link

It seems something has changed, so warning is missing again, both on JavaScript and Node.js docs.

I've also seen this regression today for 6.1.0.

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

5 participants