Make Application Insight instrumentation key as an optional parameter for Wellbore DDMS
Overview
- The changes in this merge request are part of fixing bug backlog item - 229.
- Modified the instrumentation argument
AZ_AI_INSTRUMENTATION_KEY
is_mandatory flag from "True" to "False" - Modified files like logger and traces files where the azure exporter is created.
Testing
- Followed steps from the Readme file to run unit tests and they completed successfully.
- Created new instance VkTestInstance2 with resource group as Compute-rg-vkTestInstance2-nwfmqs, kubernetes service aks-vq7hvwrlwvbhm. There were 2 changes made in the YAML file of kubernetes:
- Modified the container to point to the image: manual-wellbore-ddms1:latest which is changes made as part of fixing this bug.
- name: wellbore-ddms
image: oepdpdfacr.azurecr.io/manual-wellbore-ddms1:latest
- Removed AZ_AI_INSTRUMENTATION_KEY env from the YAML script and found that container for wellbore-ddms did not crash and ran successfully. Also verified log errors in jarvis and found that the logs failing due to "ValueError: Invalid instrumentation key." were no longer visible.
- name: AZ_AI_INSTRUMENTATION_KEY
valueFrom:
secretKeyRef:
name: central-logging
key: appinsights
Before code change:
- In case we remove
AZ_AI_INSTRUMENTATION_KEY
env from the YAML file of wellbore-ddms service in that case the container used to crash with error as "CrashLoopBackOff" and in the jarvis we used to get "ValueError: Invalid instrumentation key." error.
Edited by Vaibhavi Kamani