I'm not allowed to comment, otherwise this would be a comment on the previous answer.
There's a danger in spinning up a TelemetryClient/TelemetryConfiguration pair when you want them and then immediately disposing of them. The danger is that you make your application wait, synchronously, while you force the TelemetryClient to flush its buffers and send whatever telemetry it has accumulated. A safer usage pattern is to create however many of them but retain your references for the lifetime of your application so that you can re-use existing instances and don't get a memory leak but you still allow the TelemetryClient to buffer data and send when appropriate.