-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[JS sample] Add CoreBot with Application-Insights #1773
Conversation
Add DialogBot Add DialogAndWelcomeBot Add Resources for DialogAndWelcomeBot
Add BookingDialog Add cancelAndHelpDialog Add dateResolverDialog
Add Index.js Add cognitivesModels folder Add deploymentTemplates folder Fix minor issues in dialog & dialogBot
* Replace appsettings.json with .env file. * Add information about appInsights instrumentation key.
Add bookingDialog as a parameter of mainDialog instead of creating it.
samples/javascript_nodejs/21.corebot-app-insights/bots/resources/welcomeCard.json
Outdated
Show resolved
Hide resolved
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.
Nice - thanks Gaspar!
- index.js: uncommented line for using restify.plugins.bodyParser. - welcomeCard.json: set isSubtle to true. - README.md: replace references to sample 13 with references to Sample 21. - README.md: add link to AppInsights documentation.
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.
Nice - thanks!!
- As the mainDialog extends ComponentDialog, it s not necessary to pass the TelemetryClient as a parameter in its constructor. Instead, we can use the telemetryClient property from the ComponentDialog.
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.
Please make these changes to revert this code back to what it is in the coreBot sample app. The purposes of this sample app is very narrowly focused to show only what changes are required to update the coreBot sample app to add telemetry capabilities. Any changes beyond that will detract from that purpose.
I also noticed the string interpolation changes you made as well, and I think those are OK (in my opinion they are better, and virtually unnoticeable and I can get away with not documenting them)
samples/javascript_nodejs/21.corebot-app-insights/dialogs/bookingDialog.js
Show resolved
Hide resolved
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.
Please revert all non-critical changes not required to implement telemetry.
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/mainDialog.js
Outdated
Show resolved
Hide resolved
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.
Please remove brackets, unless there is an important reason to change, please revert these changes.
samples/javascript_nodejs/21.corebot-app-insights/dialogs/cancelAndHelpDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/cancelAndHelpDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/cancelAndHelpDialog.js
Outdated
Show resolved
Hide resolved
samples/javascript_nodejs/21.corebot-app-insights/dialogs/cancelAndHelpDialog.js
Show resolved
Hide resolved
- Restore MainDialog previous constructor. - Restore Booking Dialog previous contructor. - Removed unnecessary brackets.
I will re-open this PR shortly once I have made updates to the sample to use latest telemetry pieces |
Proposed Changes
21.corebot-app-insights
, based on JS Sample#13More Information
This sample:
Help
orCancel
Testing
To test this sample:
samples/javascript_nodejs/21.corebot-app-insights
npm install
npm start