Skip to content

chore: added SLA buckets for histogram metrics#37778

Closed
ApekshaBhosale wants to merge 1 commit intoreleasefrom
add-buckets-for-histogram
Closed

chore: added SLA buckets for histogram metrics#37778
ApekshaBhosale wants to merge 1 commit intoreleasefrom
add-buckets-for-histogram

Conversation

@ApekshaBhosale
Copy link
Contributor

@ApekshaBhosale ApekshaBhosale commented Nov 27, 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
    • Introduced a new configuration property for monitoring HTTP server request performance.
    • Enhanced tracking capabilities with defined Service Level Agreements (SLA) for request response times.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2024

Walkthrough

The pull request introduces a new configuration property in the application.properties file for the Appsmith server. This property, management.metrics.distribution.sla.http.server.requests, defines several thresholds in milliseconds for monitoring HTTP server request performance. This addition aims to enhance the application's monitoring capabilities by allowing performance tracking against specified Service Level Agreements (SLAs).

Changes

File Path Change Summary
app/server/appsmith-server/src/main/resources/application.properties Added new property: management.metrics.distribution.sla.http.server.requests with defined SLA thresholds.

Possibly related PRs

  • chore: Enable netty metrics based on env var #36108: The changes in this PR also involve modifications to the application.properties file, adding a new configuration property related to metrics, which aligns with the main PR's focus on enhancing monitoring capabilities through a new property in the same file.

Suggested labels

skip-changelog

Suggested reviewers

  • sondermanish
  • nidhi-nair

🎉 In the realm of code where metrics thrive,
A new property added, keeping performance alive.
With thresholds defined, our server will see,
How swiftly it serves, as fast as can be!
So let’s track those requests, with joy and delight,
Monitoring our SLAs, everything feels right! 🌟


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.

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: 0

🧹 Outside diff range and nitpick comments (1)
app/server/appsmith-server/src/main/resources/application.properties (1)

102-102: Consider optimizing SLA bucket distribution

While the implementation is correct, consider the following suggestions:

  1. The 1000000ms (1000s) bucket seems excessive for HTTP requests
  2. Consider adding intermediate buckets between 5s and 10s
  3. Document the reasoning behind these specific bucket choices

Consider adjusting the buckets to better reflect typical web request patterns:

-management.metrics.distribution.sla.http.server.requests=100ms,300ms,500ms,1000ms,3000ms,5000ms,10000ms,1000000ms
+management.metrics.distribution.sla.http.server.requests=100ms,300ms,500ms,1000ms,3000ms,5000ms,7500ms,10000ms,30000ms
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0b10696 and 17d5f75.

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

102-102: Verify metrics configuration integration

The SLA configuration requires proper integration with Spring Boot Actuator metrics. Let's verify the setup:

✅ Verification successful

Metrics configuration is properly integrated

The configuration is correctly set up with:

  • Prometheus and metrics endpoints exposed
  • Prometheus metric descriptions enabled
  • HTTP server request histogram percentiles enabled
  • No conflicting SLA configurations found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify metrics configuration
# Check for required metric configurations and potential conflicts

# Look for metric-related configurations
echo "Checking metric configurations..."
rg -i "management\.(metrics|endpoints|prometheus)" 

# Look for any potential duplicate SLA configurations
echo "Checking for duplicate SLA configurations..."
rg "management\.metrics\.distribution\.sla"

Length of output: 1043

@ApekshaBhosale
Copy link
Contributor Author

/build-deploy-preview skip-test=true

@github-actions
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/12048987325.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 37778.
recreate: .

@github-actions
Copy link

Failed server tests

  • com.appsmith.server.services.ce.ActionServiceCE_Test#testActionWithGraphQLDatasourceMoustacheBinding

@github-actions
Copy link

Deploy-Preview-URL: https://ce-37778.dp.appsmith.com

@ApekshaBhosale ApekshaBhosale changed the title added SLA buckets for histogram metrics chore: added SLA buckets for histogram metrics Nov 27, 2024
@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 27, 2024
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