Hi @Samy ,
Greetings! I have created an IoTHubTrigger function using Visual Studio and noticed a similar behavior when the function is deployed to cloud. And as you suspected, the cloud deployment missed the configuration for the connection string set to the Event Hub end point.
You can view this configuration issue when you click on Diagnose and solve problems setting under your Azure function on the portal. Refer the below image.
To resolve this, click on Configuration under Settings section and add a new Application Setting to add the connection string parameter. Refer the below image
Please note that you would have to name the application setting parameter as IotHubConnectionString in your case.
Once you add the parameter and save the settings, you can see the IoTHubTrigger function on the cloud gets triggered and you the graph reflects the metrics in a bit. Refer the below image.
Please let me know if you face any issues in implementing the steps suggested or need further clarification.
----------
Kindly accept answer or upvote if the response is helpful so that it would benefit other community members facing the same issue. I highly appreciate your contribution to the community.