Hi Punar Datt,
This error often occurs because the required dependencies for MySQL are not properly included in the Azure Function project or the correct version is not available.
I also faced this type of issue and by following changes I succeeded to resolve.
1. Check your MySQL NuGet Package version: you need to ensure that you're using the correct version of the MySql.Data NuGet package also need to install the MySqlConnector if you're using it.
2. Ensure the DiagnosticSource package is included: The error you mentiond i.e System.Diagnostics.DiagnosticSource. This indicates that your project is missing this package or has an incorrect version.
3. Update Azure Functions Runtime: Ensure your Azure Functions runtime version is compatible with the version of the MySql.Data library you're using. You can set the runtime version in the host.json file or you can update it via Azure Portal.
These steps can be helpful for you, I made my issue resolve by using 1 and 2 solutions.
Thanks