Hi Experts,
We have a requirement of logging custom traces in Azure Application Insights from plugin custom code.
Can you please help with out with the process that should be followed for insights implementation.
I have seen couple of links online which specified below code with instrumentation key. There wasn't any thing related to azure connections.
TelemetryClient telemetry = new TelemetryClient();
telemetry.InstrumentationKey = "xxxxxx-xxxxxxx-xxxxxxx-xxxxxxxx";
// Set session data:
telemetry.Context.User.Id = Environment.UserName;
telemetry.Context.Session.Id = Guid.NewGuid().ToString();
telemetry.Context.Device.OperatingSystem = Environment.OSVersion.ToString();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
var properties = new Dictionary<string, string>
{
{ "correlationid", "1236547" },
{ "stage", "1236547"},
{ "object", "1236547"},
};
telemetry.TrackEvent("TrailInsights", properties, null);
Please help me with possible solution.
Regards,
Veer