Skip to content

Commit dbff560

Browse files
Igor Drozdove_forbes
authored andcommitted
Merge branch 'ef-add-duo-review-rules-for-fields' into 'main'
Adds MR Review instructions focused around Log Field Standardisation See merge request https://gitlab.com/gitlab-org/gitlab-shell/-/merge_requests/1370 Merged-by: Igor Drozdov <idrozdov@gitlab.com> Approved-by: Javiera Tapia <jtapia@gitlab.com> Approved-by: Igor Drozdov <idrozdov@gitlab.com> Reviewed-by: Javiera Tapia <jtapia@gitlab.com> Co-authored-by: e_forbes <eforbes@gitlab.com>
2 parents b3afcc9 + 7b12e9a commit dbff560

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# Custom instructions for GitLab Duo Code Review
3+
# Based on GitLab's official code review guidelines
4+
5+
# References:
6+
# - Field Standardisation in Observability: https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/observability_field_standardisation/
7+
8+
9+
# This file defines custom review criteria that will be applied to specific files
10+
# during merge request reviews. Instructions are grouped by name and can target
11+
# multiple file patterns using glob syntax.
12+
instructions:
13+
- name: Log Field Standards
14+
fileFilters:
15+
- "**/*.go"
16+
- "!**/*_test.go"
17+
instructions: |
18+
Backend engineers should be complying with the new field standardisation in observability best practices
19+
1. For any log lines that have been altered:
20+
- Ask: "If you are adding or modifying fields that aren't service specific, please ensure that the field is defined within the LabKit Go Fields package"
21+
- Remind: "Common logging fields should be defined within the LabKit fields package and imported from there if they aren't service specific. Link: https://gitlab.com/gitlab-org/labkit/-/tree/master/fields?ref_type=heads"
22+
2. For any new fields being added to log messages:
23+
- Check to ensure that these fields are not dynamically generated
24+
- Remind: "We're aiming to standardise the fields that we emit across all of our services at GitLab through this approach. Read more about this in https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/observability_field_standardisation/"

0 commit comments

Comments
 (0)