-
Notifications
You must be signed in to change notification settings - Fork 177
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
feat: track gen-ai use in Intercom COMPASS-7116 #5442
Conversation
4fea1eb
to
efa2d57
Compare
adding a |
efa2d57
to
b4d274d
Compare
try { | ||
win.Intercom('track', event, metadata); | ||
} catch (error) { | ||
debug('intercom track error', error); |
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.
Just FYI: I don't think debug() would end up in a log file. If you're interested in seeing this in logs if it happens you would have to use log() on it.
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.
hmm, I thought it'd make sense to use the same level as when the intercom fails to load ->
.catch((e) => debug('queue error', e)); |
but tbh I'm not sure why that level was chosen in that instance either 🤔
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.
probably because it's not an user facing failure, so noone would look into the logs unless debugging anyway? or are there other cases where you'd imagine we'd need this in the logs?
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.
The problem with debug() is that you can only see it if you have debug enabled and you're looking at the console or stdout. So it isn't something a user can spot in a log file and send it to us and we'd have to already know how to recreate the intercom failure in order to generate any debug output locally.
Which might be fine. Just thought I'd bring it up.
88d3ccb
to
c3bd6eb
Compare
https://jira.mongodb.org/browse/COMPASS-7116
Description
It seems feasible that the intercom track would be reused in the future, so I added it to utils - let me know if that's not the best place. The intercom setup is currently in the main compass package.
Also please consider if I missed any other place where NL is used 😅
The new tests for
GenerativeAIInput
are regression, I couldn't test the new behaviour because I couldn't put a spy onintercomTrack
(not without moving it directly to the utils/index file or somewhere else completely).Checklist
Motivation and Context
Open Questions
There are several logs associated with intercom setup. Do we want to log this event as well?
compass/packages/compass/src/app/intercom/intercom-script.ts
Line 55 in 0719486
Types of changes