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

chore: added slo buckets for histogram #37797

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

ApekshaBhosale
Copy link
Contributor

@ApekshaBhosale ApekshaBhosale commented Nov 28, 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=""

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • New Features

    • Enhanced observability and tracing capabilities for improved server performance monitoring.
    • Introduced Google reCAPTCHA for enhanced site security.
  • Configuration Changes

    • Updated HTTP request metrics management to focus on service level objectives (SLOs).
    • Expanded properties for observability metrics, enabling detailed tracing and metrics management.

Copy link
Contributor

coderabbitai bot commented Nov 28, 2024

Walkthrough

The changes in this pull request involve modifications to the application.properties file for the Appsmith server. Key updates include the removal of a property related to HTTP request percentiles and its replacement with a new property focused on service level objectives (SLOs). Additionally, new properties for OpenTelemetry tracing and Google reCAPTCHA have been introduced, enhancing observability and security configurations while allowing for environment variable management.

Changes

File Path Change Summary
app/server/appsmith-server/src/main/resources/application.properties - Removed: management.metrics.distribution.percentiles-histogram.http.server.requests
- Added: management.metrics.distribution.slo.http.server.requests=100,200,500,1000,30000
- Added: google.recaptcha.key.site
- Added: google.recaptcha.key.secret
- Retained: management.tracing.enabled with new OpenTelemetry properties for tracing configuration
- Added: appsmith.observability.metrics.enabled, appsmith.observability.tracing.detail.enabled,
appsmith.observability.metrics.detail.enabled (controlled via environment variables)

Possibly related PRs

Suggested labels

skip-changelog, ok-to-test

Suggested reviewers

  • sharat87
  • nidhi-nair
  • mohanarpit

🎉 In the land of code where properties play,
Metrics and tracing have found a new way.
With SLOs in sight and reCAPTCHA in hand,
Observability blooms, like a flower so grand.
Environment variables dance in delight,
As changes bring clarity, making everything right! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 91f9c9b and 982283b.

📒 Files selected for processing (1)
  • app/server/appsmith-server/src/main/resources/application.properties (1 hunks)
🔇 Additional comments (3)
app/server/appsmith-server/src/main/resources/application.properties (3)

Line range hint 103-107: LGTM - Well-structured observability configuration

The observability configuration is well-organized with appropriate defaults and clear environment variable mappings.


101-101: Verify the 30s SLO bucket threshold

The SLO buckets are well-distributed for monitoring request latencies, but the 30000ms (30s) threshold seems unusually high for a web request. Consider if this aligns with your service level objectives.

✅ Verification successful

The 30s SLO bucket is appropriate for this application

The 30s threshold in the SLO buckets is justified given the application's nature:

  • The codebase shows long-running operations like Git repository operations and import/export services
  • These operations are tracked using custom stopwatch implementations
  • The application has a graceful shutdown timeout of 20s, indicating support for long-running operations
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any existing timeout configurations that might justify the 30s threshold
rg -i 'timeout|connection.timeout|socket.timeout' --type properties

Length of output: 104


Script:

#!/bin/bash
# Search for timeout configurations in application properties with .properties extension
fd -e properties | xargs rg -i 'timeout|connection.timeout|socket.timeout'

# Also check for any Spring Boot server timeout configurations
fd -e properties | xargs rg -i 'server\..*timeout|spring\..*timeout'

Length of output: 381


Script:

#!/bin/bash
# Let's check for any HTTP client configurations that might justify long timeouts
fd -e properties | xargs rg -i 'http\.client|webclient|rest\.template'

# Also check for any custom SLO or metrics configurations
fd -e properties | xargs rg -i 'metrics\.distribution|slo|histogram'

Length of output: 292


Script:

#!/bin/bash
# Let's check Java files for any long-running operations or timeout configurations
ast-grep --pattern 'class $_ {
  $$$
  @Value("${management.metrics.distribution.slo.http.server.requests}")
  $$$
}'

# Also check for any custom metric configurations in Java files
rg -A 5 "MetricRegistry|MeterRegistry|Timer|Histogram" --type java

Length of output: 4675


Line range hint 112-113: Ensure secure handling of reCAPTCHA credentials

The reCAPTCHA configuration looks correct, but since this is security-critical:

  1. Verify that these environment variables are properly secured in your deployment pipeline
  2. Consider the interaction with the signup.disabled property
✅ Verification successful

reCAPTCHA configuration properly integrated with signup flow

The reCAPTCHA integration is correctly implemented:

  • reCAPTCHA V3 is used throughout the application
  • Verification is enforced during signup in UserSignupCEImpl
  • Proper error handling for failed verifications (GOOGLE_RECAPTCHA_FAILED)
  • Configuration interacts correctly with signup.disabled property - reCAPTCHA check happens before signup validation
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any signup-related configurations that might need reCAPTCHA integration
rg -B 2 -A 2 'signup|recaptcha|security' --type properties

Length of output: 95


Script:

#!/bin/bash
# Search for signup and security related configurations in all files
rg -B 2 -A 2 'signup|recaptcha|security' app/server/appsmith-server/src/main/resources/

# Also check for any Java files that might be using these properties
ast-grep --pattern 'class $_ {
  $$$
  @Value($$$)
  private $_ $_;
  $$$
}'

Length of output: 46107


Script:

#!/bin/bash
# Search for signup and reCAPTCHA related Java files
rg -B 2 -A 2 'signup|recaptcha|RECAPTCHA' --type java app/server/

# Check for any configuration usage in Java files
ast-grep --pattern 'class $_ {
  $$$
  @Value("${google.recaptcha.$_}")
  private String $_;
  $$$
}'

Length of output: 60555


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 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.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Nov 28, 2024
@nidhi-nair nidhi-nair merged commit 803c80d into release Nov 28, 2024
16 checks passed
@nidhi-nair nidhi-nair deleted the histogram-buckets-added branch November 28, 2024 15:12
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants