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: Standardize log patterns across all services for consistency. #38285

Open
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

subhrashisdas
Copy link
Member

@subhrashisdas subhrashisdas commented Dec 20, 2024

Description

Tip

Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team).

Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR.

Fixes #Issue Number
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags="@tag.Sanity"

🔍 Cypress test results

Caution

🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12438439560
Commit: 1c48cae
Cypress dashboard.
Tags: @tag.Sanity
Spec:
The following are new failures, please fix them before merging the PR:

  1. cypress/e2e/Regression/ServerSide/OnLoadTests/PostgresConnections_spec.ts
  2. cypress/e2e/Sanity/Datasources/Arango_Basic_Spec.ts
List of identified flaky tests.
Fri, 20 Dec 2024 21:38:49 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced logging capabilities for various services, including distinct log file paths incorporating hostnames.
    • Introduced event logging for standard output and error streams.
  • Bug Fixes

    • Improved error handling through updated logging configurations.
  • Chores

    • Reorganized configuration parameters for better clarity and management across multiple services.
    • Increased maximum log file sizes from 10MB to 30MB and set backups to zero for all services.

Copy link
Contributor

coderabbitai bot commented Dec 20, 2024

Walkthrough

This pull request standardizes and enhances logging configurations across multiple Supervisord configuration files for various services in the Appsmith deployment. The changes include updating log file paths to incorporate the hostname, increasing log file sizes from 10MB to 30MB, removing log file backups, and adding event logging capabilities. These modifications aim to improve log management and traceability across different application components.

Changes

File Change Summary
deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/backend.conf Updated log file paths, increased log sizes to 30MB, set log backups to 0, added event logging
deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/editor.conf Modified log file paths, increased log sizes to 30MB, set log backups to 0, added event logging, introduced startretries
deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/rts.conf Updated log configurations with hostname-specific paths, increased log sizes to 30MB, set log backups to 0
deploy/docker/fs/opt/appsmith/templates/supervisord/mongodb.conf Reordered parameters, updated log paths to include hostname, increased log sizes to 30MB, set log backups to 0
deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf Updated log file paths to include hostname, increased log sizes to 30MB, set log backups to 0
deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf Modified log paths to include hostname, increased log sizes to 30MB, set log backups to 0

Possibly related PRs

Suggested labels

skip-changelog

Suggested reviewers

  • sharat87
  • pratapaprasanna
  • mohanarpit

Poem

🌟 Logs dancing with grace and might,
Hostname whispers in each byte's light,
Thirty megs of wisdom unfurled,
No backups, but stories untold,
Supervisord's symphony takes flight! 🚀


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d56a86 and 1c48cae.

📒 Files selected for processing (6)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/backend.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/editor.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/rts.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/mongodb.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/mongodb.conf
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/backend.conf
  • deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf
  • deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/rts.conf
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/editor.conf

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@subhrashisdas subhrashisdas force-pushed the feature-uniform-logs branch 2 times, most recently from d70b34d to c94f52f Compare December 20, 2024 20:42
@subhrashisdas subhrashisdas changed the title Standardize log patterns across all services for consistency. feat: Standardize log patterns across all services for consistency. Dec 20, 2024
@github-actions github-actions bot added the Enhancement New feature or request label Dec 20, 2024
@subhrashisdas subhrashisdas added skip-changelog Adding this label to a PR prevents it from being listed in the changelog ok-to-test Required label for CI and removed Enhancement New feature or request labels Dec 20, 2024
@subhrashisdas subhrashisdas marked this pull request as ready for review December 20, 2024 20:52
@subhrashisdas subhrashisdas added skip-changelog Adding this label to a PR prevents it from being listed in the changelog ok-to-test Required label for CI and removed ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Dec 20, 2024
@github-actions github-actions bot added Enhancement New feature or request and removed skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Dec 20, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (4)
deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf (2)

12-13: Reconsider log size limits for database service

The 30MB log size limit might be insufficient for a database service, which typically generates more logs than application services.

Consider:

  1. Increasing *_logfile_maxbytes for database services
  2. Implementing log rotation based on time rather than size
  3. Setting up database-specific logging configurations

Also applies to: 15-16


9-16: Consider implementing a comprehensive logging strategy

While standardizing log patterns is good, consider implementing:

  1. Centralized log aggregation (e.g., ELK stack, Splunk)
  2. Service-specific log retention policies
  3. Structured logging format for better searchability
  4. Monitoring and alerts for log storage usage

Would you like assistance in designing a comprehensive logging architecture?

deploy/docker/fs/opt/appsmith/templates/supervisord/mongodb.conf (1)

3-3: Review MongoDB logging strategy

MongoDB is configured with both native logging (--logpath) and supervisord logging. This could lead to:

  1. Duplicate logs consuming extra disk space
  2. Confusion when debugging issues
    Consider using only MongoDB's native logging mechanism and monitoring it through supervisord.

Also applies to: 11-17

deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf (1)

14-15: Implement a log retention strategy for Redis logs

While directing Redis logs to stdout is correct, consider:

  1. Implementing log rotation with a reasonable number of backups
  2. Setting up external log aggregation for persistent storage
    This ensures no critical information is lost during debugging or auditing.

Also applies to: 18-19

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 79ff105 and 1d56a86.

📒 Files selected for processing (6)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/backend.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/editor.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/application_process/rts.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/mongodb.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/postgres.conf (1 hunks)
  • deploy/docker/fs/opt/appsmith/templates/supervisord/redis.conf (1 hunks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant