-
Notifications
You must be signed in to change notification settings - Fork 73
chore: switch to @mongodb-js/device-id
#2446
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
Conversation
public setupTelemetryPromise: Promise<void> = Promise.resolve(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
private resolveDeviceId: (value: string) => void = () => {}; | ||
private readonly telemetrySetup: AbortController = new AbortController(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a huge fan of this name, maybe deviceIdResolution
though I was thinking this would be shared by the entire setup.
I could also call it abortController
but seems like a implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it's odd to refer to an abort mechanism as ...Setup
🙂 No strong feelings here but maybe just telemetrySetupAbort
?
003520f
to
7850337
Compare
}), | ||
]); | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const getMachineId = require('native-machine-id').getMachineId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously in a try/catch (to avoid crashing mongosh in situations in which we cannot load this), should it continue to be?
aea1f71
to
cf2e0ef
Compare
cf2e0ef
to
377de04
Compare
This package is meant to minimize code replication and to make sure the approach we're taking with hashing is consistent and timeouts are automatically handled.
See mongodb-js/devtools-shared#532