-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure we include end_value in generated Prometheus buckets (#3363)
Right now we're generating the buckets, but it's not in an inclusive way, and it should be. For latency metrics, for example, you have `end_value` being 500ms, but one of the buckets is 159. Since we're using a multiplication factor of 3, the next bucket would go over 500ms, so we don't include it... Make sure we always include the `end_value` bucket CI + start a network locally and see the correct buckets exported - Nothing to do / These changes follow the usual release cycle.
- Loading branch information
Showing
2 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
description: Cursor Rules Location | ||
globs: *.mdc | ||
--- | ||
# Cursor Rules Location | ||
|
||
Rules for placing and organizing Cursor rule files in the repository. | ||
|
||
<rule> | ||
name: cursor_rules_location | ||
description: Standards for placing Cursor rule files in the correct directory | ||
filters: | ||
# Match any .mdc files | ||
- type: file_extension | ||
pattern: "\\.mdc$" | ||
# Match files that look like Cursor rules | ||
- type: content | ||
pattern: "(?s)<rule>.*?</rule>" | ||
# Match file creation events | ||
- type: event | ||
pattern: "file_create" | ||
|
||
actions: | ||
- type: reject | ||
conditions: | ||
- pattern: "^(?!\\.\\/\\.cursor\\/rules\\/.*\\.mdc$)" | ||
message: "Cursor rule files (.mdc) must be placed in the .cursor/rules directory" | ||
|
||
- type: suggest | ||
message: | | ||
When creating Cursor rules: | ||
|
||
1. Always place rule files in PROJECT_ROOT/.cursor/rules/: | ||
``` | ||
.cursor/rules/ | ||
├── your-rule-name.mdc | ||
├── another-rule.mdc | ||
└── ... | ||
``` | ||
|
||
2. Follow the naming convention: | ||
- Use kebab-case for filenames | ||
- Always use .mdc extension | ||
- Make names descriptive of the rule's purpose | ||
|
||
3. Directory structure: | ||
``` | ||
PROJECT_ROOT/ | ||
├── .cursor/ | ||
│ └── rules/ | ||
│ ├── your-rule-name.mdc | ||
│ └── ... | ||
└── ... | ||
``` | ||
|
||
4. Never place rule files: | ||
- In the project root | ||
- In subdirectories outside .cursor/rules | ||
- In any other location | ||
|
||
examples: | ||
- input: | | ||
# Bad: Rule file in wrong location | ||
rules/my-rule.mdc | ||
my-rule.mdc | ||
.rules/my-rule.mdc | ||
|
||
# Good: Rule file in correct location | ||
.cursor/rules/my-rule.mdc | ||
output: "Correctly placed Cursor rule file" | ||
|
||
metadata: | ||
priority: high | ||
version: 1.0 | ||
</rule> |
This file contains 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