private async Task <(Guid Id, string Name)> FakeCallToHttpApiToPutAssociatedItem(MyFirstCommand message, CancellationToken ct)
        {
            var stopwatch = Stopwatch.StartNew();

            await Task.Delay(1, ct).ConfigureAwait(false);

            _instrumentor.TrackDependency(2, stopwatch.ElapsedMilliseconds, DateTimeOffset.Now, "HTTP", "SomeAPI", "PUT", $"Id: {message.Id}");

            return(Guid.NewGuid(), message.Name);
        }
        private async Task FakeCallToPersistToSomeDatabase(MySecondCommand dbContract, CancellationToken ct)
        {
            var stopwatch = Stopwatch.StartNew();
            await Task.Delay(50, ct).ConfigureAwait(false);

            _instrumentor.TrackDependency(DbPersistElapsed, stopwatch.ElapsedMilliseconds, DateTimeOffset.Now, "Database", "SomeSQL", "Insert", $"Id: {dbContract.Id}");
        }
 private void TrackDependency(
     Stopwatch sw, string name, IDictionary <string, object> customProperties = null)
 {
     _instrumentor.TrackDependency(
         LogEventIds.OutboundGatewayMeasuredElapsedSingle,
         sw.ElapsedMilliseconds,
         DateTimeOffset.Now,
         AzureServiceBusDependencyType,
         _sender.Path,
         name,
         isSuccessful: true,
         customProperties: customProperties);
 }