Hi @CudoXY ,
Welcome to Microsoft Q&A! Thanks for posting the question.
There are certain limitations when calling the AppInsight's TelemetryClient from Azure Function App. For example, "You should not call TrackRequest or StartOperation<RequestTelemetry>, because you'll see duplicate requests for a function invocation. The Functions runtime automatically tracks requests."
The details for using TelemetryClient and custom DependencyTelemetry is available at this link: Log custom telemetry in Azure Functions
In this example, the DependencyTelemetry is used to record the success or failure of any operation.
Also, for tracking the Exception, you can use the initialized telemetryClient object as given in this example as below:
this.telemetryClient.TrackException(new Exception("test exception"));
This code snippet when added after the this.telemetryClient.TrackDependency() call looks like below in End-to-end transaction details
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.