Skip to content
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

Merged
merged 18 commits into from
Oct 7, 2023
Merged

feat: add app insights monitoring #151

merged 18 commits into from
Oct 7, 2023

Commits on Sep 17, 2023

  1. Configuration menu
    Copy the full SHA
    fe37973 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2023

  1. Configuration menu
    Copy the full SHA
    aa6e379 View commit details
    Browse the repository at this point in the history
  2. aider: Update the app class to set the OTEL_LOGS_EXPORTER, OTEL_METRI…

    …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.
    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    530539c View commit details
    Browse the repository at this point in the history
  3. chore: formatting

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    eb30a23 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0b6d764 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cfcd6f3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    43059bc View commit details
    Browse the repository at this point in the history
  7. fix: remove unused imports

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    248cbf7 View commit details
    Browse the repository at this point in the history
  8. fix: add type to parameter

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    4c9eaf2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d53a4fc View commit details
    Browse the repository at this point in the history
  10. fix: add encoding on open

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    6558b06 View commit details
    Browse the repository at this point in the history
  11. fix: lint issues

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    f1ac99d View commit details
    Browse the repository at this point in the history
  12. fix: lint issues

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    6cd8848 View commit details
    Browse the repository at this point in the history
  13. fix: lint issues

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    5f03a14 View commit details
    Browse the repository at this point in the history
  14. fix: lint issues

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    043e87c View commit details
    Browse the repository at this point in the history
  15. fix: lint issues

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    edd10e4 View commit details
    Browse the repository at this point in the history
  16. fix: update param types

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    1736044 View commit details
    Browse the repository at this point in the history
  17. fix: param types

    danstis committed Oct 7, 2023
    Configuration menu
    Copy the full SHA
    c1049a4 View commit details
    Browse the repository at this point in the history