Tag: 遥测

API Application Insights使用的良好实践

我阅读了这篇文档: https : //docs.microsoft.com/en-us/azure/application-insights/app-insights-api-custom-events-metrics 跟踪exception,跟踪跟踪等有许多不同的API方法。 我有一个ASP.NET MVC 5应用程序。 例如,我有以下控制器方法(由ajax调用): [AjaxErrorHandling] [HttpPost] public async Task SyncDriverToVistracks(int DriverID) { if ([condition]) { // some actions here try { driver.VistrackId = await _vistracksService.AddNewDriverToVistrackAsync(domain); await db.SaveChangesAsync(); } catch (VistracksApiException api_ex) { // external service throws exception type VistracksApiException throw new AjaxException(“vistracksApiClient”, api_ex.Response.Message); } catch (VistracksApiCommonException common_ex) { // external […]