I have a custom Docker image that uses Windows Servercore as base image..
I have written commands in Dockerfile , which will perform a git pull when my docker image is pulled from Azure Container Registry
Git Repository contains Application Insights DLL and a powershell script. Script uses DLL to create a object of Telemetry and pushes a Dummy Data to App Insights using Trackevent(). I have set this file as Entrypoint in my DockerFile.
So When I Run the Instance/Perform a Docker Pull, The Script runs. The Script runs completely(I have written Write-Host at different parts of Script to confirm this) but the Data is not logged into Azure Application Insights.
when i tried to run the script locally , it does Log the Data to App Insights. Am I missing something here?
$eventprops = @{ Name = "Test" };
$jsonevent=ConvertTo-Json $eventprops;
$client.TrackEvent($jsonevent,$null)
# $client is a Telemetry object