public async void SetupLogDocumentMultiTest() { ElasticsearchReporter r = new ElasticsearchReporter(CreateCli <ElasticsearchSetupDocument>().Object); var d = new ElasticsearchSetupDocument(); await r.Post(new ElasticsearchSetupDocument[] { d, d }.AsEnumerable(), "testindex"); // TODO: Verify result }
public async void SetupLogDocumentTest() { ElasticsearchReporter r = new ElasticsearchReporter(CreateCli <ElasticsearchSetupDocument>().Object); var d = new ElasticsearchSetupDocument(); await r.Post(d, "testindex"); // TODO: Verify result }
protected async Task ReportSetupEvent(ClientRegistration registration, string @event, bool clientProcessed) { var doc = new ElasticsearchSetupDocument(id: _client.RequestId, logName: "setup_log" , appName: _client.AppName, action: @event , actionId: registration?.ClientStateId.ToString(), actionOriginator: registration?.ClientKey , actionDate: DateTime.Now, subscriber: registration?.BaseUrl , message: registration?.Description, path: Request.Path , controllerName: ControllerContext.RouteData?.Values["controller"]?.ToString(), actionName: ControllerContext.RouteData?.Values["action"]?.ToString() , elapsedSeconds: null, parameters: new Dictionary <string, string> { { "client_processed", clientProcessed.ToString() } }, resultCode: 200); await _remoteLogger.ReportSetupLog(doc); }
public async Task ReportSetupLog(ElasticsearchSetupDocument doc) => await Report(setupLogReporter, doc);