semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Initial pass at AppInsights sending custom events

Open IanNorris opened this issue 1 year ago • 1 comments

Motivation and Context

Tracking high level user engagement of features can direct further development and enable measurements of active user counts. It is important to note that completions and conversations themselves should not be logged, just data useful in aggregate.

Description

This is an initial pass for review by the team.

Motivation and Context

  1. This change is essential for tracking user engagement and creating an audit trail of user activity.
  2. This change adds a basic framework for tracking key telemetry events
  3. This scenario enables management of those teams deploying instances to understand how their deployment is being used by their team.
  4. This is not related to an open issue.

Description

The overall design is to add a service accessible to controllers and other services that enables telemetry to be fired with minimal context. For this an abstract ITelemetryService interface was added, allowing systems to fire events on this from across the kernel without any dependencies on a specific implementation.

Contribution Checklist

  • [X] The code builds clean without any errors or warnings
  • [X] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
  • [X] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
  • [] All unit tests pass, and I have added new tests where possible - tests appear to fail locally for config related reasons.
  • [ ] I didn't break anyone :smile: - maybe myself, a bit...

IanNorris avatar May 10 '23 01:05 IanNorris

Apologies for the delay on this, hoping to get back to fixing the defects mid next week.

IanNorris avatar May 12 '23 17:05 IanNorris

I've added some docs around using this including some example queries to get people started (as this may be the first time many people are experiencing KQL). I'm not sure if this is too verbose or not. Perhaps if the readme gets much longer we might want to pull the docs out into separate files

IanNorris avatar Jun 02 '23 17:06 IanNorris