Microsoft.SqlServer.XEvent

  • Thread starter Thread starter Priya Bange
  • Start date Start date
P

Priya Bange

Guest
Hi Experts,

Could any one please share an example how I can use this nugget package to dump its output back to SQL Server.

Microsoft.SqlServer.XEvent.XELite 2019.11.20.2

I am able to parse the extended event file like below & see its output in the console window.

internal class DataProcessing
{


public string InputFilePath { get; }

public DataProcessing(string filePath)
{
InputFilePath = filePath;
}

public void Process()
{

if (!File.Exists(InputFilePath))
{
return;
}


string inputFileName = Path.GetFileName(InputFilePath);
Console.WriteLine($"{inputFileName}");
string extension = Path.GetExtension(InputFilePath);

var xeStream = new XEFileEventStreamer(InputFilePath);

xeStream.ReadEventStream(

xevent => {
Console.WriteLine(xevent);
Console.WriteLine("");
return Task.CompletedTask;
},
CancellationToken.None).Wait();



}


Thanks

Priya

Continue reading...
 

Similar threads

P
Replies
0
Views
410
Priya Bange
P
P
Replies
0
Views
111
Priya Bange
P
P
Replies
0
Views
110
Priya Bange
P
E
Replies
0
Views
169
elfenliedtopfan55
E
Back
Top