labkit

package module
v1.64.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 0 Imported by: 0

README

LabKit 🧪 🔬 🥼 🥽 🧫 🧬 💉

LabKit is GitLab's standardised abstraction layer for platform capabilities in Go services: observability, database connectivity, feature gating, secret management, and service lifecycle. Platform teams publish once; product engineers adopt without reinventing the same infrastructure boilerplate.

Two modules

LabKit is published as two independent Go modules, each with its own go.mod and its own README. Pick the one that matches your project:

Module Import path Status README
v1 gitlab.com/gitlab-org/labkit Security updates only - no planned development; being phased out README-v1.md
v2 gitlab.com/gitlab-org/labkit/v2 Active development - start here for new work v2/README.md
Why two modules?

The two modules reflect a generational shift in the underlying observability and runtime ecosystem rather than a simple version bump:

  • v1 is built on the earlier generation of libraries - OpenTracing, Logrus, and direct Prometheus wiring. It receives security updates only; no new features are planned. v1 is being phased out as v2 is built out and consumers are migrated across.
  • v2 is built on the current generation - OpenTelemetry, the standard library's log/slog, and an app.App lifecycle that wires logging, tracing, metrics, and pluggable components into a common start/shutdown flow. This is where all consumers will eventually land.

They are separate modules so that adopting v2 does not force v1's dependency tree on existing consumers, and so the two can evolve and release independently. All new services and new development should target v2.

Getting started

  • New service? Read the v2 README and start from the app package.
  • Maintaining an existing v1 consumer? See the v1 README for the available packages and usage.

Contributing

See CONTRIBUTING.md for how to contribute.

Please use the Conventional Commits commit format for all changes.

Getting help

Questions or need a hand? Open an issue or reach out in the #labkit Slack channel.

Documentation

Overview

Package labkit is a minimalist library to provide functionality for Go services at GitLab.

Directories

Path Synopsis
Package correlation is the primary entrypoint into LabKit's correlation utilities.
Package correlation is the primary entrypoint into LabKit's correlation utilities.
raven
Package raven is allows correlation information to be added to raven requests.
Package raven is allows correlation information to be added to raven requests.
Package errortracking abstracts all error reporting features away from services like workhorse or pages
Package errortracking abstracts all error reporting features away from services like workhorse or pages
Package fields is intended to be the SSOT for Go applications for all of the field names used within our observability setup.
Package fields is intended to be the SSOT for Go applications for all of the field names used within our observability setup.
Package log provides sensible logging defaults for Labkit.
Package log provides sensible logging defaults for Labkit.
Package mask offers the functionality for non-reversible masking of sensitive data in the GitLab application.
Package mask offers the functionality for non-reversible masking of sensitive data in the GitLab application.
Package metrics is the primary entrypoint into LabKit's metrics utilities.
Package metrics is the primary entrypoint into LabKit's metrics utilities.
Package monitoring provides a monitoring endpoint and Continuous Profiling for Go service processes.
Package monitoring provides a monitoring endpoint and Continuous Profiling for Go service processes.
Package tracing is the primary entrypoint into LabKit's distributed tracing functionality.
Package tracing is the primary entrypoint into LabKit's distributed tracing functionality.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL