OpenTelemetry deployment yaml to collect telemetry and send to AppInsights
I verified that logs, traces and metrics were landing in AppInsights.
closes #88
A couple of notes:
With the current way that we deploy the fastapi app, it doesn't redeploy when we call kubectl apply. I believe this is due to having no changes in the yaml. Even though I set imagePullPolicy to Always, the redeployment is not triggered. I needed to delete the pod for it to come up with the latest version.
Running this pipeline for the first time will fail since the namespace basic-flow-app needs to exist before creating the secrets. We may want to modify this so the namespace gets created first.
To test:
connect to aks cluster az aks get-credentials --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME
port-forward the service kubectl port-forward svc/basic-flow-app-service 8080:8080 -n basic-flow-app
go to browser and hit one of the endpoints http://localhost:8080/class_basic_flow?entity_type=people%27s+full+name&text=The+novel+The+Great+Gatsby+was+written+by+F+Scott+Fitzgerald.
Go to AppInsights instance and click the Transaction search tab. It will take around a minute for the telemetry to show up
Description
This adds:
I verified that logs, traces and metrics were landing in AppInsights.
closes #88
A couple of notes:
imagePullPolicy
toAlways
, the redeployment is not triggered. I needed to delete the pod for it to come up with the latest version.basic-flow-app
needs to exist before creating the secrets. We may want to modify this so the namespace gets created first.To test:
az aks get-credentials --resource-group $MY_RESOURCE_GROUP_NAME --name $MY_AKS_CLUSTER_NAME
kubectl port-forward svc/basic-flow-app-service 8080:8080 -n basic-flow-app
http://localhost:8080/class_basic_flow?entity_type=people%27s+full+name&text=The+novel+The+Great+Gatsby+was+written+by+F+Scott+Fitzgerald.
Transaction search
tab. It will take around a minute for the telemetry to show up