Skip to content

Add application logging proposals#45

Merged
ryanjjung merged 4 commits intomainfrom
logs-docs
Mar 6, 2026
Merged

Add application logging proposals#45
ryanjjung merged 4 commits intomainfrom
logs-docs

Conversation

@ryanjjung
Copy link
Copy Markdown
Contributor

This PR comes after a discussion in an Infra Team meeting recently in which we discussed defining our logging purpose and parameters. I threw this at the wall, so let's talk about it and see what sticks.

@ryanjjung ryanjjung self-assigned this Mar 3, 2026
@ryanjjung ryanjjung added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 3, 2026
@ryanjjung ryanjjung requested a review from aatchison March 3, 2026 21:06
@malini
Copy link
Copy Markdown

malini commented Mar 5, 2026

this approach looks good to me!

Copy link
Copy Markdown
Collaborator

@aatchison aatchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been looking at this and have a few thoughts.

Let's create different categories of policy and consolidate those?

Configuration

  • type of data collected
  • end to end encryption
  • etc

Access

  • who is allowed to access
  • how do they access
  • roles and policies
  • how do we audit access

Lifecycle

  • retention settings
  • where do we aggregate logs and how do we manage them

Auditing

  • how do we keep track of what is configured, and where it lives
  • how do we ensure new applications are following the polices
  • alert on out of spec resources

Implementation

  • inventory of resources
  • types of resources using logging
  • how do we deliver a unified configuration to all services
  • etc

aatchison
aatchison previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Collaborator

@aatchison aatchison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very verbose, and it is well categorized. Thanks for taking my suggestion!

@ryanjjung
Copy link
Copy Markdown
Contributor Author

I redesigned a lot of this to include some level of detail in response to @aatchison's commentary. I've changed the proposal into two files. One is "guidelines" - a set of rules to guide any logging solution we may have to come up with. (What if we launch in Azure? With Kubernetes? Get rich and buy a Splunk license? These things change the specifics of our logging systems, and we will have to come up with new solutions. I wanted a generic set of guidelines to steer those future decisions as well.)

The other is a proposal for how those guidelines can be implemented using AWS services with CloudWatch Logs as the destination. It explains how we should configure encryption, retention, etc. for that particular solution, and how we can retrofit our existing projects to align with the guidelines.

@ryanjjung ryanjjung requested review from aatchison and mzeier March 6, 2026 20:55
@ryanjjung ryanjjung changed the title Add rough draft of app logs doc Add application logging proposals Mar 6, 2026
Copy link
Copy Markdown

@mzeier mzeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please no Splunk. I still have scars.

Comment on lines +27 to +29
- Policies granting access to these logs can be crafted around the logical separators of environment and application.
IAM user groups with these policies applied can be created to control log access to individuals.
- CloudWatch Log Groups can be configured with a retention window, automating the deletion of log data according to our
Copy link
Copy Markdown
Collaborator

@aatchison aatchison Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might think about using:

  • profile roles for applications that allow Cloudwatch write/least access for the application resources themselves
  • read roles with read access to the cloudwatch logs
  • user roles such as a read only role for access via the read roles

We could create these roles and resources based on the service and environment names like service-env-fdsaf-Profile for example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, my thinking here is to leave the implementation at the Policy level so that you can attach those Policies to any permissions model you want to run. You can do the users -> user groups -> policies model or the policy -> role -> oidc auth model, whatever works for the org, and it's flexible.

Copy link
Copy Markdown
Collaborator

@aatchison aatchison Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that makes sense. I'm just advocating for defining both security profiles, the ones emmiting logs to cloud watch and any entity reading them can be separate. That way readers can't modify and apps can't read.

Actually, I would throw in a third role for lambdas or other actions that need to write to clear logs as an example. Some resources require permissions on both ends.

@ryanjjung ryanjjung merged commit 0366d26 into main Mar 6, 2026
3 checks passed
@ryanjjung ryanjjung deleted the logs-docs branch March 6, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants