How to view Event Hub log data that is capture in blob using C #

I have a simple logic app that creates a text file .

I want test whether the logic app created file is present in file storage .

And also want to check the value of correlation id of logic app

I created an Event Hub and In Logic app configure Diagnostic Settings to Stream to an event hub .

Now Inside Event hub I have configure Capture option to Azure Storage which will create a blob file for events logs

I wonder how can I check 2 things from the blob event using C # code?

I want to check the following -

1. When starting the Logic application, I want to check the property_ID property, which I suppose I will get from the event log.

  1. In a Logic application, I create one txt file, I want to get this newly created file name from the event logs.

Any idea above 2 questions?

I tried this post

But there are several files generated per second, and exactly which file contains what I need to guess?

the code works well -

 var storageAccount = CloudStorageAccount.Parse(connectionString); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference(containerName); var blob = container.GetBlockBlobReference(blobName); using (var stream = blob.OpenRead()) using (var reader = AvroContainer.CreateGenericReader(stream)) while (reader.MoveNext()) foreach (dynamic result in reader.Current.Objects) { var record = new AvroEventData(result); record.Dump(); } 
0
source share

All Articles