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

[JS sample] Add CoreBot with Application-Insights #1773

Merged
merged 36 commits into from
Jan 23, 2020

Conversation

gasper-az
Copy link
Contributor

Proposed Changes

  • Add sample 21.corebot-app-insights, based on JS Sample#13

More Information

This sample:

  • Uses LUIS to implement core AI capabilities
  • Implements a multi-turn conversation using Dialogs
  • Handles user interruptions for such things as Help or Cancel
  • Prompts for and validates requests for information from the user
  • Uses Application Insights to monitor your bot

Testing

To test this sample:

  1. Clone this branch
  2. In a terminal, navigate to samples/javascript_nodejs/21.corebot-app-insights
  3. Install modules with npm install
  4. Setup LUIS
  5. Run the sample with npm start

* Replace appsettings.json with .env file.

* Add information about appInsights instrumentation key.
Add bookingDialog as a parameter of mainDialog instead of creating it.
Copy link
Contributor

@daveta daveta left a 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.
Copy link
Contributor

@daveta daveta left a 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.
Copy link
Contributor

@WashingtonKayaker WashingtonKayaker left a 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)

Copy link
Contributor

@WashingtonKayaker WashingtonKayaker left a 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.

Copy link
Contributor

@WashingtonKayaker WashingtonKayaker left a 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.

- Restore MainDialog previous constructor.

- Restore Booking Dialog previous contructor.

- Removed unnecessary brackets.
@garypretty
Copy link
Contributor

I will re-open this PR shortly once I have made updates to the sample to use latest telemetry pieces

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

Successfully merging this pull request may close these issues.

8 participants