application insights to azure bot

RACHEL BRITTO 0 Reputation points
2023-07-20T13:35:52.72+00:00

have to create a function app for sending the application insights logs to the azure bot in C#

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
728 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,033 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,990 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 14,680 Reputation points
    2023-07-20T18:27:47.3166667+00:00

    Hi @RACHEL BRITTO

    kindly follow the below steps

    Step 1: Set up Azure Function App

    • Create a new Azure Function App in the Azure portal.
    • Choose the runtime stack as ".NET" and select C# as the language.

    Step 2: Enable Application Insights

    • Go to the Function App's Configuration section in the Azure portal.
    • Enable Application Insights by connecting it to your Function App.

    Step 3: Install Required NuGet Packages

    • In your C# project, install the Azure.Messaging.WebPubSub NuGet package to send messages to the Azure Bot Service.

    Step 4: Add Code for Sending Logs to Bot

    • Write the C# code within the Azure Function to fetch Application Insights logs.
    • Process the logs as required and send them to the Azure Bot using Azure.Messaging.WebPubSub.

    Step 5: Deploy and Test

    • Deploy the Function App and ensure it is connected to the Application Insights and the Azure Bot Service.
    • Test the function to verify that the logs are being sent to the Azure Bot successfully.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings?tabs=portal

    If you find this helpful kindly accept answer, thanks much

    0 comments No comments