-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(logging): CW client, deviceId & NetworkMonitor #12907
feat(logging): CW client, deviceId & NetworkMonitor #12907
Conversation
fee80f1
to
93fccde
Compare
packages/logging/__tests__/providers/cloudwatch/apis/cloudWatchClient.test.ts
Show resolved
Hide resolved
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.
Great work @Samaritan1011001 !!
Just a couple of questions and nits for refactoring based on the previous PR merged
packages/logging/__tests__/providers/cloudwatch/apis/cloudWatchClient.test.ts
Outdated
Show resolved
Hide resolved
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 am good overall with this. I think we need to re-arrange and organize some utils function but good to followup with another PR.
1d88b22
to
06cb07e
Compare
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.
Thanks @Samaritan1011001, Looking good
Just a couple of nits and questions
I'm good with also adding TODOs and getting this merged
packages/core/src/Reachability/ReachabilityMonitor/NetworkConnectionMonitor.ts
Show resolved
Hide resolved
}, | ||
}; | ||
|
||
export const cloudWatchProvider: CloudWatchProvider = { |
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.
nit
I'm wondering if we should break up this entire object into separate functions.
For internal logs the API that exposes the CW object could just be something like
export const cloudWatchProvider: LoggingProvider = {
log: (logParams: LogParams) => {
logToCloudWatch(logParams);
}
};
Also with the recent design proposal, we're planning to just expose CW provider enable/disable instead of the entire category level enable/disable so I think we should be fine
4791fbc
to
0aef343
Compare
9a8b9a0
to
1a10743
Compare
Description of changes
This PR brings in the following three main pieces:
a. Example format of the log message sent to CloudWatch --
[${logLevel}] ${namespace}/${category}: ${message}
There are a couple of TODOs in the CW client that is left for further addition to the implementation.
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.