From 4a5ec920a5845314014802c376e4e6c85380dc1f Mon Sep 17 00:00:00 2001 From: e_forbes Date: Tue, 4 Nov 2025 10:40:48 +0000 Subject: [PATCH 1/2] chore: adds some better documentation around the labkit fields package --- fields/doc.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fields/doc.go b/fields/doc.go index 505b2b71..e4435b9b 100644 --- a/fields/doc.go +++ b/fields/doc.go @@ -4,5 +4,17 @@ of the field names used within our observability setup. This is intended to help enforce consistency across components when it comes to field names. + +Labkit-Ruby: +https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby/-/blob/master/lib/labkit/fields.rb?ref_type=heads + +For Engineers Looking to add fields: + +Please see the handbook page for more information +https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/observability_field_standardisation/ + +Note: this Go package sets the standards for all Labkit variants. Other +Labkit variants will be derived from the fields defined within this package +to ensure consistency. */ package fields -- GitLab From 48fecda2be2f17833ca09cbafd2a23e9032e6df2 Mon Sep 17 00:00:00 2001 From: e_forbes Date: Wed, 5 Nov 2025 11:53:50 +0000 Subject: [PATCH 2/2] Adds some better comments to help future maintainers of this fields package --- fields/fields.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fields/fields.go b/fields/fields.go index 930a4ee8..beb605c6 100644 --- a/fields/fields.go +++ b/fields/fields.go @@ -15,4 +15,10 @@ const ( // GitLabUserName - a string field that // captures the user's username for logging purposes. GitLabUserName = "gl_user_name" + + // New fields being added to this section should have + // the appropriate doc comments added above. These + // should clearly indicate what the intended use of the + // field is and should be replicated across the labkit + // variations. ) -- GitLab