bot-fmk-logging

1.0.0 • Public • Published

Adding Logging to an Existing bot

Follow these steps:

Connect to Application Insights

  1. Create an Application Insights service under your subscription.
  2. Use the Instrumentation Key inside your bot registration page under Instrumentation key.
  3. Uner the App Insights serivce, go to API Access and copy Application ID
  4. Uner the App Insights serivce, go to API Access >> New Key with Read permissions and copy Api Key.

Connect to Cognitive Services

Create a new Sentiment Analisys Service under Cognitive Services. When creating the service, make sure to mark Text Analytics - Preview.

Setting Environment Variables

APPINSIGHTS_INSTRUMENTATIONKEY={App Insights Instrumentation Key}
CG_SENTIMENT_KEY={Cognitive Services Text Analytics Key}

Connecting to Code

var logging = require('bot-fmk-logging');
 
logging.monitor(bot, { transactions: [
    {
        intent: 'alarm.set',
        test: /^(Creating alarm named)/i
    }
]});

Readme

Keywords

none

Package Sidebar

Install

npm i bot-fmk-logging

Weekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • mor.shemesh