-
Notifications
You must be signed in to change notification settings - Fork 11
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 : Implementation of datadog and deprecation of papertrail #105
base: main
Are you sure you want to change the base?
Conversation
…pertrail_logger file
…tadog logger, added file to create HTTPLog
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
* add commands to makefile * updated README file
…tadog logger, added file to create HTTPLog
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…tadog logger, added file to create HTTPLog
* updated tests folder to root * updated SQ checks * update tests path in Makefile * fix(tests): update python path for pytest imports (#111) * fix(tests): change relative file paths to absolute * Revert "fix(tests): change relative file paths to absolute" This reverts commit f1e920c. * fix(tests): change python path to recognize imports
* add commands to makefile * updated README file
This comment has been minimized.
This comment has been minimized.
update npm build to npm run build
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left some cursory comments for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File names should be case insensitive. Hence, instead of DDHandler
, it should be datadog_handler.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made these changes in most recent update
@@ -1,6 +1,6 @@ | |||
from modules.common.dict_util import DictUtil | |||
from modules.config.config_manager import ConfigManager | |||
from modules.config.types import PapertrailConfig | |||
from modules.config.types import DatadogConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not desirable. Config service should be agnostic of other module. It should only be responsible to get config values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have implemented the changes exactly as how Papertrail logger was implemented, which is why I have kept it in this file, as Papertrail was also mentioned in same way. Can you provide more specific details on how I can change this.
host=DictUtil.required_get_str(input_dict=ConfigManager.config, key="PAPERTRAIL_HOST"), | ||
port=int(DictUtil.required_get_str(input_dict=ConfigManager.config, key="PAPERTRAIL_PORT")), | ||
def get_datadog_config() -> DatadogConfig: | ||
datadog_config = DictUtil.required_get_dict(input_dict=ConfigManager.config,key="DATADOG") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible that for some app, we may not want this to be enabled. From an architecture standpoint, datadog integration should be optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logger being used or not is getting depended on the environment settings, which is the settings folder in backend. Each setting mentions which logger has to be used, as it was mentioned for Papertrail. Can you share more details on how I can change the current implementation and make the integration optional
api_key=DictUtil.required_get_str(input_dict=datadog_config, key="dd_api_key"), | ||
host=DictUtil.required_get_str(input_dict=datadog_config,key="dd_site_name"), | ||
app_name = DictUtil.required_get_str(input_dict=datadog_config,key="dd_app_name"), | ||
dd_log_level = DictUtil.required_get_str(input_dict=datadog_config,key="dd_log_level") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here, and other places, avoid using dd
, use datadog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made these changes in the most recent commit
@@ -2,6 +2,8 @@ | |||
|
|||
|
|||
@dataclass(frozen=True) | |||
class PapertrailConfig: | |||
class DatadogConfig: | |||
api_key: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Order alphabetically.
Plus, this typedef is not expected part of Config module which is generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have ordered the variables alphabetically in the most recent commit. The Papertrail logger was mentioned in this file, which is why I have removed PapertrailConfig class from here and added DatadogConfig class instead as replacement. Can you provide more details on this so I can make further changes
host: str | ||
port: int | ||
app_name: str | ||
dd_log_level: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sound like it should be an enum
…d the DatadogConfig frozen class in types
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… datadog_handler_level to use the enum values for the logger level
This comment has been minimized.
This comment has been minimized.
Minimum allowed line rate is |
Description :
Tests
Automated test cases added :
Manual test cases run :