A summary of data about the Ruby ecosystem.

https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby

LabKit is minimalist library to provide functionality for Ruby services at GitLab.
https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby

Keywords

hacktoberfest

Keywords from Contributors

activejob activerecord mvc grape rspec authorization doorkeeper identity oauth oauth2

Last synced: about 14 hours ago
JSON representation

Repository metadata

LabKit is minimalist library to provide functionality for Ruby services at GitLab.

https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby/blob/master/

          # LabKit-Ruby 🔬🔬🔬🔬🔬

LabKit-Ruby is minimalist library to provide functionality for Ruby services at GitLab.

LabKit-Ruby is the Ruby companion for [LabKit](https://gitlab.com/gitlab-org/labkit), a minimalist library to provide functionality for Go services at GitLab.

LabKit-Ruby and LabKit are intended to provide similar functionality, but use the semantics of their respective languages, so are not intended to provide identical APIS.

## Documentation

API Documentation is available at [the Rubydoc site](https://www.rubydoc.info/gems/gitlab-labkit/).

## Changelog

The changelog is available via [**tagged release notes**](https://gitlab.com/gitlab-org/labkit-ruby/tags)

## Functionality

LabKit-Ruby provides functionality in a number of areas:

1. `Labkit::Context` used for providing context information to log messages.
1. `Labkit::Correlation` for accessing the correlation id. (Generated and propagated by `Labkit::Context`)
1. `Labkit::UserExperienceSli` for tracking User Experience SLIs. More on the [README](./lib/labkit/user_experience_sli/README.md).
1. `Labkit::ApplicationSli` for tracking Application SLIs (Apdex and error-rate). More on the [README](./lib/labkit/application_sli/README.md).
1. `Labkit::FIPS` for checking for FIPS mode and using FIPS-compliant algorithms.
1. `Labkit::Logging` for sanitizing log messages.
1. `Labkit::Metrics` for metrics. More on the [README](./lib/labkit/metrics/README.md).
1. `Labkit::RateLimit` for rules-based, Redis-backed rate limiting. More on the [README](./lib/labkit/rate_limit/README.md).
1. `Labkit::RSpec` for RSpec matchers to test Labkit functionality (requires selective loading). More on the [README](./lib/labkit/rspec/README.md).
1. `Labkit::Tracing` for handling and propagating distributed traces.

## Developing

Anyone can contribute!

```console
$ git clone git@gitlab.com:gitlab-org/labkit-ruby.git
$ cd labkit-ruby
$ bundle install

$ # Autoformat code and auto-correct linters
$ bundle exec rake fix

$ # Run tests, linters
$ bundle exec rake verify
```

Some specs require a real Redis instance. When you run the suite locally,
it will automatically start one via `docker compose up -d redis` (see
`docker-compose.yml`) and tear it down again when the test process exits.
Redis is exposed on `localhost:6390` so it does not collide with a local
GDK/Caproni Redis on the default port.

To opt out of autostart (e.g. you've started Redis some other way), set
`LABKIT_TEST_REDIS_URL` to a reachable instance, or
`LABKIT_TEST_REDIS_NO_AUTOSTART=1` to fail loudly instead of spawning.

The `conformance-spec` CI job gates merge requests on the
[labkit-spec](https://gitlab.com/gitlab-org/quality/tooling/labkit-spec)
conformance harness. It triggers a downstream pipeline in labkit-spec that
checks out the MR's commit and runs the Ruby conformance suite against it,
with the `gitlab-labkit` gem installed from that checkout instead of the
released version. A change to logging, lifecycle, or rate limiting is
therefore checked against the cross-SDK scenarios before it merges, and the
downstream result is mirrored here, so a red run blocks the merge. To run it
locally, clone labkit-spec and replace the `gitlab-labkit` line in
`conformance/servers/ruby/Gemfile` with

```ruby
gem "gitlab-labkit", path: "/path/to/labkit-ruby"
```

then run `mise run conformance:ruby` from the spec checkout (the rate-limit
aspect needs Docker or `CONFORMANCE_REDIS_ADDR`).

If your change also needs a labkit-spec change (a new scenario, or an update
to its Ruby server), open and merge that MR first. The trigger always runs
labkit-spec `main`, so the spec side has to land before the gate here can
pass.

Please also review the [development section of the LabKit (go) README](https://gitlab.com/gitlab-org/labkit#developing-labkit) for details of the LabKit architectural philosophy.

To work on some of the scripts we use for releasing a new version,
make sure to add a new `.env.sh`.

```console
cp .env.example.sh .env.sh`
```

Inside `.env.sh`, add a personal acccess token for the `CHANGELOG_GITLAB_TOKEN`
environment variable. Next source the file:

```console
. .env.sh
```

### Releasing a new version

Releasing a new version can be done by pushing a new tag, or creating
it from the
[interface](https://gitlab.com/gitlab-org/labkit-ruby/-/tags).

A new changelog will automatically be added to the release on Gitlab.

The new version will automatically be published to `gitlab-labkit` on
[rubygems](https://rubygems.org/gems/gitlab-labkit) when the pipeline
for the tag completes. It might take a few minutes before the update
is available.

A gem called [`labkit-ruby`](https://rubygems.org/gems/labkit-ruby) is
also published to RubyGems.org as a placeholder. The same bot that
pushes this gem has access.

        

Owner metadata


Committers metadata

Last synced: 2 days ago

Total Commits: 562
Total Committers: 53
Avg Commits per committer: 10.604
Development Distribution Score (DDS): 0.746

Commits in past year: 295
Committers in past year: 20
Avg Commits per committer in past year: 14.75
Development Distribution Score (DDS) in past year: 0.759

Name Email Commits
Hercules Merscher h****r@g****m 143
GitLab Renovate Bot o****e@g****m 86
Max Woolf m****f@g****m 31
Igor Wiedler i****r@g****m 28
Sam Wiskow s****w@g****m 25
Bob Van Landuyt b****b@g****m 23
Stan Hu s****u@g****m 23
Elliot Forbes e****s@g****m 20
Matias Alvarez m****z@g****m 18
Matthias Kaeppler m****r@g****m 18
Andrew Newdigate a****w@g****m 17
dbarrett d****t@g****m 14
nindurkar n****r@g****m 11
Bob Van Landuyt b****b@v****o 9
Takuya Noguchi t****h@g****m 9
Vitaly Slobodin v****n@g****m 9
Sankalp s****s@g****m 7
Ashwin S a****s@g****m 6
andrey a****s@g****m 6
Jacob Vosmaer j****b@g****m 5
service-platforms-labkit s****t@g****m 5
Alejandro Rodríguez a****o@g****m 4
Peter Leitzen p****n@g****m 4
Quang-Minh Nguyen q****n@g****m 4
Sean McGivern s****n@g****m 3
Heinrich Lee Yu h****h@g****m 2
Hordur Freyr Yngvason h****n@g****m 2
Igor Drozdov i****v@g****m 2
Kev Kloss k****s@g****m 2
Oswaldo Ferreira o****o@g****m 2
and 23 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 15 hours ago


Package metadata

gem.coop: gitlab-labkit

Instrumentation for GitLab

  • Homepage: https://gitlab.com/gitlab-org/labkit-ruby
  • Documentation: http://www.rubydoc.info/gems/gitlab-labkit/
  • Licenses: MIT
  • Latest release: 5.2.0 (published about 17 hours ago)
  • Last Synced: 2026-09-24T11:33:39.431Z (about 15 hours ago)
  • Versions: 146
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 51,611,595 Total
  • Docker Downloads: 434,202,946
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.205%
    • Docker downloads count: 0.325%
    • Downloads: 0.493%
  • Maintainers (3)
rubygems.org: gitlab-labkit

Instrumentation for GitLab

  • Homepage: https://gitlab.com/gitlab-org/labkit-ruby
  • Documentation: http://www.rubydoc.info/gems/gitlab-labkit/
  • Licenses: MIT
  • Latest release: 5.2.0 (published about 17 hours ago)
  • Last Synced: 2026-09-24T11:33:26.203Z (about 15 hours ago)
  • Versions: 146
  • Dependent Packages: 0
  • Dependent Repositories: 757
  • Downloads: 51,611,595 Total
  • Docker Downloads: 434,202,946
  • Rankings:
    • Docker downloads count: 0.391%
    • Downloads: 0.511%
    • Dependent repos count: 1.231%
    • Average: 7.878%
    • Forks count: 12.112%
    • Dependent packages count: 15.693%
    • Stargazers count: 17.328%
  • Maintainers (3)

Dependencies

gitlab-labkit.gemspec rubygems
  • excon ~> 0.78.1 development
  • faraday ~> 1.2.0 development
  • gitlab-dangerfiles ~> 2.11.0 development
  • gitlab-styles ~> 6.2.0 development
  • grpc-tools >= 1.37 development
  • httparty ~> 0.17.3 development
  • httpclient ~> 2.8.3 development
  • pry ~> 0.12 development
  • rack ~> 2.0 development
  • rake ~> 12.3 development
  • rest-client ~> 2.1.0 development
  • rspec ~> 3.10.0 development
  • rspec-parameterized ~> 0.4 development
  • rufo = 0.9.0 development
  • sidekiq >= 5.2 development
  • webrick ~> 1.7.0 development
  • actionpack >= 5.0.0, < 8.0.0
  • activesupport >= 5.0.0, < 8.0.0
  • grpc >= 1.37
  • jaeger-client ~> 1.1.0
  • opentracing ~> 0.4
  • pg_query ~> 2.1
  • redis > 3.0.0, < 5.0.0

Score: 28.220125769174548