data-api-builder
data-api-builder copied to clipboard
Create Custom Events for Application Insights
Custom events in Azure Application Insights are used to track and visualize custom scenarios or occurrences in the application that aren't automatically captured by Application Insights. They can be used to track business events or user interactions that are specific to an application.
Adding custom events can provide valuable insights into how users are interacting with an application, which features are being used the most, and where potential issues or bottlenecks might be occurring. They can help us understand user behavior, measure the effectiveness of features, and identify areas for improvement.
Custom events ideas:
- Error
- Transient DB error
- 500 error
- bad request (these may be numerous, so allow dev to subscribe/unsubscribe)
- database connection issue
- config issue (validation issue/ or value results in engine startup failure)
- Request Received
- REST
- GraphQL
- Identify popular endpoints/entities and sort by data source/database type.
- Start/Stop/Reload for DAB engine
- Config file events
- Loaded
- Hot-Reloaded
- Merged
- Config Found
- Feature usage (allow dev to see feature usage, not Microsoft)
- Multiple Mutations
- Caching (also can emit events to show cache hits/misses to allow devs to optimize their dab config cache settings)
- Role usage across requests
Consider:
- Additional config property required? if so, what would that look like
- Is there "framework" code that can be added first so that adding more events later is straightforward? To keep the scope of this issue reasonable, we shouldn't attempt to add every single event mentioned in the original description. pick one and use it to illustrate what code changes will be needed.