generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 23
Adding a custom log #406
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
Merged
Merged
Adding a custom log #406
+1
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
majanjua-amzn
approved these changes
May 16, 2025
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.
LGTM, please appropriately fill in your PR description
srprash
approved these changes
May 16, 2025
Jeel-mehta
added a commit
that referenced
this pull request
Jun 3, 2025
*Issue description:* We need a reliable way to validate SigV4 logs across different language implementations (Python, JavaScript, .NET, Java) for our sample applications. The current logging doesn't provide a consistent, easily identifiable log entry for this purpose. This PR adds a standardized SigV4 logging mechanism to the Java sample application, similar to what was implemented for Python in [[PR #406]](#406). *Description of changes:* Added a custom WARNING log in the aws_sdk_call function of the Python sample application. This custom log will be present in the log-group and can be used to filter logs from those created while running the sample application. This change provides a consistent log entry that can be replicated across other language implementations for uniform SigV4 log validation. *Rollback procedure:* 1. Remove the line `logger.warn("This is a custom log for validation testing");` from the aws_sdk_call function in views.py. 2. Commit and push the change. 3. Redeploy the application. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: Jeel Mehta <[email protected]>
Jeel-mehta
added a commit
that referenced
this pull request
Jul 3, 2025
*Issue description:* We need a reliable way to validate SigV4 logs across different language implementations (Python, JavaScript, .NET, Java) for our sample applications. The current logging doesn't provide a consistent, easily identifiable log entry for this purpose. This PR adds a standardized SigV4 logging mechanism to the Javascript sample application, similar to what was implemented for Python in [PR [#406]](#406) and Java in [PR [#411]](#411) *Description of changes:* Added a custom WARNING log in the aws_sdk_call function of the Python sample application. This custom log will be present in the log-group and can be used to filter logs from those created while running the sample application. This change provides a consistent log entry that can be replicated across other language implementations for uniform SigV4 log validation. *Rollback procedure:* 1. Remove the line logger.warn("This is a custom log for validation testing"); from the aws_sdk_call function in index.js of frontend service. 2. Commit and push the change. 3. Redeploy the application. Testing: For testing, used a sample app and instrument it with adot js to visualize if the new custom log appears in cloudwatch console. Here is the screenshot of the log from cloudwatch console. <img width="1400" alt="Screenshot 2025-07-03 at 10 19 03 AM" src="https://github.com/user-attachments/assets/97e845ed-2856-471a-b4ae-8125f40ad063" /> <img width="1404" alt="Screenshot 2025-07-03 at 10 19 12 AM" src="https://github.com/user-attachments/assets/6f26b52a-3415-47d3-9c17-74f801b3b219" /> <Can we safely revert this commit if needed? If not, detail what must be done to safely revert and why it is needed.> *Ensure you've run the following tests on your changes and include the link below:* To do so, create a `test.yml` file with `name: Test` and workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing. NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the [needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds) keyword to run tests in succession. - Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2 - Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and eu-central-2 - Run EC2 tests in all regions - Run K8s on a separate K8s cluster (check IAD test account for master node endpoints; these will change as we create and destroy clusters for OS patching) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Co-authored-by: Jeel Mehta <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue description:
We need a reliable way to validate SigV4 logs across different language implementations (Python, JavaScript, .NET, Java) for our sample applications. The current logging doesn't provide a consistent, easily identifiable log entry for this purpose.
Description of changes:
Added a custom WARNING log in the aws_sdk_call function of the Python sample application. This custom log will be present in the log-group and can be used to filter logs from those created while running the sample application. This change provides a consistent log entry that can be replicated across other language implementations for uniform SigV4 log validation.
Rollback procedure:
<Can we safely revert this commit if needed? If not, detail what must be done to safely revert and why it is needed.>
Ensure you've run the following tests on your changes and include the link below:
To do so, create a
test.ymlfile withname: Testand workflow description to test your changes, then remove the file for your PR. Link your test run in your PR description. This process is a short term solution while we work on creating a staging environment for testing.NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL. See the needs keyword to run tests in succession.
e2e-playgroundin us-east-1 and eu-central-2e2e-playgroundin us-east-1 and eu-central-2e2e-playgroundin us-east-1 and eu-central-2By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.