Skip to content

Commit 9e124c6

Browse files
Elliot ForbesAxel von Bertoldi
authored andcommitted
Adds MR Review instructions focused around Log Field Standardisation
This commit adds Log Field Standard instructions to the gitlab-runner project. This is intended to help nudge engineers to ensure they are following the field standardisation in observability practice. As it stands, this should not block any ongoing engineering efforts, but it should help to further broadcast the process and pushing for impact.
1 parent 4312aab commit 9e124c6

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: "All logging fields should be defined within the LabKit fields package and imported from there provided that they aren't specific to this service Examples are GitLabUserID. 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)