[LUIS] How to track quota usage per end-user for LUIS service?
See original GitHub issueBot Info
- SDK Platform: .NET
- SDK Version: 3.12.2.4
- Active Channels: Skype, Skype for Business, MS Teams, Slack, WebChat, Emulator
- Deployment Environment: Azure Bot Service (Used for bot channels registration), Azure App Service (used for messaging endpoint), local development with Emulator? (used only for testing & debugging using ngrok)
Issue Description
We need to generate a bill for a given customer (organization) for our bot based on their end-user(s) usage of LUIS AI on a monthly basis.
Our bot uses multiple LUIS apps & models and handles call forwarding using dialog factory pattern.
So here the problem is, we are having LUIS apps pointing only to a single LUIS AI subscription in Azure, by default in LUIS dashboard it will only show endpoint hits count within a certain period, but we can’t figure out for which customer & for which end-user how much LUIS API call quota was consumed and its cost so that we can probably sum up the individual user’s usage in order to get the usage of the customer (organization).
So, we need a way to calculate the cost accurately so that we can generate a bill based on the usage of all the end-users in that organization (customer) for that month.
Could this be done manually using logging messages to a database only in the methods having [LuisIntent]
attribute, will this suffice?
Please suggest all the possible solutions so that we can analyze which one will suit our bot.
Expected Behavior
Get individual user’s LUIS AI quota usage, store it in some database by organization wise which will help in generating the monthly bill for that organization.
Actual Results
So far haven’t been able to find an option/solution available to do this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Currently LUIS or Azure doesn’t provide tracking for the endpoints usage based on each user usage. We can track only based on the app/key/resource usage. The other alternative is to insert the endpoint hits into a different data repository such as Application Insights. Here is a tutorial to do this. The data is collected in real-time. You need to change the code so that you can track based on each end-user. You can find middleware code samples here. Hope this helps.
node tutorial: https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-tutorial-function-appinsights
corresponding c# tutorial: https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-tutorial-bot-csharp-appinsights