-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add app insights monitoring #151
Conversation
…_sync\sync\app.py
…CS_EXPORTER, and OTEL_TRACES_EXPORTER environment variables to None if the APPLICATIONINSIGHTS_CONNECTION_STRING is not populated. # Aider chat conversation: USER: update the app class to set the following environment variables to None if the APPLICATIONINSIGHTS_CONNECTION_STRING is not populated: OTEL_LOGS_EXPORTER, OTEL_METRICS_EXPORTER, OTEL_TRACES_EXPORTER ASSISTANT: To implement this change, we need to modify the `ado_asana_sync\sync\app.py` file. Specifically, we will update the `__init__` method of the `App` class to set the environment variables `OTEL_LOGS_EXPORTER`, `OTEL_METRICS_EXPORTER`, and `OTEL_TRACES_EXPORTER` to `None` if `APPLICATIONINSIGHTS_CONNECTION_STRING` is not populated. Here is the *edit block* for this change: ```python ado_asana_sync\sync\app.py <<<<<<< HEAD self.applicationinsights_connection_string = ( applicationinsights_connection_string or os.environ.get("APPLICATIONINSIGHTS_CONNECTION_STRING", None) ) self.ado_core_client = None self.ado_wit_client = None self.ado_work_client = None self.asana_client = None self.asana_page_size = ASANA_PAGE_SIZE self.asana_tag_gid = None self.asana_tag_name = ASANA_TAG_NAME self.db = None self.matches = None self.sleep_time = SLEEP_TIME ======= self.applicationinsights_connection_string = applicationinsights_connection_string or os.environ.get("APPLICATIONINSIGHTS_CONNECTION_STRING", None) if not self.applicationinsights_connection_string: os.environ["OTEL_LOGS_EXPORTER"] = None os.environ["OTEL_METRICS_EXPORTER"] = None os.environ["OTEL_TRACES_EXPORTER"] = None self.ado_core_client = None self.ado_wit_client = None self.ado_work_client = None self.asana_client = None self.asana_page_size = ASANA_PAGE_SIZE self.asana_tag_gid = None self.asana_tag_name = ASANA_TAG_NAME self.db = None self.matches = None self.sleep_time = SLEEP_TIME >>>>>>> updated ``` This change will ensure that the OpenTelemetry exporters are not set if the Application Insights connection string is not provided.
@CodiumAI-Agent /review |
PR Analysis
PR Feedback
How to use
|
@CodiumAI-Agent /improve --extended |
@CodiumAI-Agent /review -i |
Incremental PR Review
PR Analysis
How to use
|
SonarCloud Quality Gate failed. 0 Bugs 37.7% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
How to use PR-Agent
|
Checklist
CodiumAI Agent Commands
As required run the following CodiumAI Agent commands:
@CodiumAI-Agent /review
(and if required, request an incremental update with@CodiumAI-Agent /review -i
)@CodiumAI-Agent /improve --extended
@CodiumAI-Agent /describe