gitlab-labkit 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/labkit/fields.rb +38 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa84e74351dd4b2829e4275391f8edb5b14c71dd8662353fa9741ee4e6ca42d8
4
- data.tar.gz: 8a4ce606cb5a1d7f1f26c68bfd7c00078c2daa45b48b5b93e631d169364ea5e6
3
+ metadata.gz: 84b7e5d8dd7ac808b13eddd6bd9b9c01e70a0542192a65ba2ef197648998d060
4
+ data.tar.gz: b597d7bdbf957cd7affb670255bff5fbb56a0efe3d2f2426a85e21651c07dd14
5
5
  SHA512:
6
- metadata.gz: cb0460842e9bd0f2f5635981d15f5024b5f8adc47b9242b5bd2bf4b6dc0041b460bd0c491496c37416b71c833af007a889b29c73608d74825838f0f2f3449c5f
7
- data.tar.gz: 9cdb9688e251cfc87276bc507541149e54bf332f9b67ec4e3d08cce61fcc965c4b69be704f94c1bda6e8f867a31337e0dcb1736a59aec2ea1dee1cbb08683eeb
6
+ metadata.gz: d6f68fe206dceade497c046cb39d98157a16461e322e852e60618e4d3c4ae4c67b01155a1d73180a74898e4acffef6cfc9b076d61f3bd190c62c7cb766b79831
7
+ data.tar.gz: 3e087a7d38e003655216d3c2761b2dfcecd92c40fa18eaf3d49431105d4c9306e526e5bd8ab6c8625d54f9277eff5d177d43c541a5bcc8062010c369e3cb35c9
data/lib/labkit/fields.rb CHANGED
@@ -118,6 +118,44 @@ module Labkit
118
118
  # The endpoint_id of the original caller at the root of the call chain.
119
119
  ROOT_CALLER_ID = "root_caller_id"
120
120
 
121
+ # Maps each field constant to its logging field variant version.
122
+ # A version of 0 means the field is not yet assigned to any variant.
123
+ VARIANT_VERSION = {
124
+ CORRELATION_ID => 1,
125
+ GL_USER_ID => 1,
126
+ GL_USER_NAME => 1,
127
+ DUO_WORKFLOW_DEFINITION => 0,
128
+ ERROR_TYPE => 0,
129
+ ERROR_MESSAGE => 1,
130
+ HTTP_STATUS_CODE => 1,
131
+ HTTP_METHOD => 0,
132
+ HTTP_URL => 0,
133
+ DURATION_S => 1,
134
+ REMOTE_IP => 1,
135
+ TCP_ADDRESS => 0,
136
+ HTTP_URI => 0,
137
+ HTTP_HOST => 0,
138
+ HTTP_PROTO => 0,
139
+ REMOTE_ADDR => 0,
140
+ HTTP_REFERRER => 0,
141
+ HTTP_USER_AGENT => 0,
142
+ WRITTEN_BYTES => 0,
143
+ CONTENT_TYPE => 0,
144
+ TTFB_S => 0,
145
+ GL_PROJECT_ID => 1,
146
+ GL_PIPELINE_ID => 1,
147
+ TIMESTAMP => 0,
148
+ SEVERITY => 0,
149
+ LOG_MESSAGE => 1,
150
+ CLASS_NAME => 0,
151
+ SERVICE_NAME => 0,
152
+ GL_ORGANIZATION_ID => 1,
153
+ GL_PROJECT_PATH => 1,
154
+ ENDPOINT_ID => 0,
155
+ CALLER_ID => 1,
156
+ ROOT_CALLER_ID => 0,
157
+ }.freeze
158
+
121
159
  # Get the constant name for a field value
122
160
  # @param field_value [String] The field value (e.g., "gl_user_id")
123
161
  # @return [String, nil] The constant name (e.g., "GL_USER_ID") or nil if not found
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-labkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newdigate