Verified Commit f86ead71 authored by Matias Alvarez's avatar Matias Alvarez Committed by GitLab
Browse files

Merge branch 'labkit-spec/update-fields' into 'master'

feat: update field constants (labkit-spec v1.0)

See merge request !308

Merged-by: default avatarMatias Alvarez <malvarez@gitlab.com>
Approved-by: default avatarMatias Alvarez <malvarez@gitlab.com>
Co-authored-by: default avatarservice-platforms-labkit <service-platforms-labkit@gitlab.com>
parents a1276222 99f27e6e
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -90,6 +90,12 @@ module Labkit
    # GitLab pipeline numeric ID.
    GL_PIPELINE_ID = "gl_pipeline_id"

    # GitLab namespace numeric ID.
    GL_NAMESPACE_ID = "gl_namespace_id"

    # GitLab root (top-level) namespace numeric ID.
    GL_ROOT_NAMESPACE_ID = "gl_root_namespace_id"

    # Log event timestamp in ISO 8601 format (e.g. "2026-04-02T12:00:00.000Z").
    TIMESTAMP = "timestamp"

@@ -122,6 +128,10 @@ module Labkit
    # The endpoint_id of the original caller at the root of the call chain.
    ROOT_CALLER_ID = "root_caller_id"

    # GitLab SentNotification record numeric ID associated with an incoming
    # email reply.
    GL_SENT_NOTIFICATION_ID = "gl_sent_notification_id"

    # Maps each field constant to its logging field variant version.
    # A version of 0 means the field is not yet assigned to any variant.
    VARIANT_VERSION = {
@@ -149,6 +159,8 @@ module Labkit
      TTFB_S => 0,
      GL_PROJECT_ID => 1,
      GL_PIPELINE_ID => 1,
      GL_NAMESPACE_ID => 0,
      GL_ROOT_NAMESPACE_ID => 0,
      TIMESTAMP => 0,
      SEVERITY => 0,
      LOG_MESSAGE => 1,
@@ -159,6 +171,7 @@ module Labkit
      ENDPOINT_ID => 0,
      CALLER_ID => 1,
      ROOT_CALLER_ID => 0,
      GL_SENT_NOTIFICATION_ID => 0,
    }.freeze

    # Get the constant name for a field value