BlazorApplicationInsights icon indicating copy to clipboard operation
BlazorApplicationInsights copied to clipboard

Support the `addTelemetryInitializer` boolean delegate

Open jacobjmarks opened this issue 3 months ago • 5 comments

The addTelemetryInitializer function defines the following signature:

public addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void)

[...] If one of the telemetry initializers returns false or throws an error, then the telemetry item will not be sent.

I don't believe there currently exists a way to utilise this boolean delegate such that telemetry items can be conditionally excluded or otherwise handled. This would be extremely useful.

I realise there may be JS interop limitations which immediately prevent this capability (serialization of a Func<> argument), but raising this issue in the hopes that some level of equivalence could be achieved.

jacobjmarks avatar May 12 '24 09:05 jacobjmarks