I have a .NET Core web app which is sending some custom events telemetry to Application Insights. The custom events are sent using telemetry client instace, e.g. like that:
telemetryClient.TrackEvent(Names.FileDownload, new Dictionary<string, string>()
{
{PropertyKeys.ProjectName, project.ProjectName},
{PropertyKeys.ProjectUri, project.ProjectUri},
{PropertyKeys.IsLocal, isLocal.ToString() },
{PropertyKeys.FileSize, fileSize?.ToString() },
});
Most of the data events that occur are in massive numbers and I don't care about all of them, so I have set up sampling to 50%.
However, I have one or two events that occur very infrequently, and for those I want each occurrence to be tracked.
With sampling enabled, I see that this crucial event is almost never stored. When I disable the sampling, it starts to work.
Is it possible to somehow exclude certain telemetry items from being filtered by sampling?
Regards,
Bartosz