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 1 hour ago
JSON representation
Repository metadata
LabKit is minimalist library to provide functionality for Ruby services at GitLab.
- Host: gitlab.com
- URL: https://gitlab.com/gitlab-org/ruby/gems/labkit-ruby
- Owner: gitlab-org
- License: mit
- Created: 2019-02-20T19:56:14.661Z (over 7 years ago)
- Default Branch: master
- Last Synced: 2025-10-07T22:24:58.430Z (10 months ago)
- Topics: hacktoberfest
- Stars: 9
- Forks: 5
- Open Issues: 26
- Releases: 0
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.
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
- Name: GitLab.org
- Login: gitlab-org
- Email:
- Kind: organization
- Description: Open source software to collaborate on code
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://gitlab.com/uploads/-/system/group/avatar/9970/project_avatar.png
- Repositories: 1553
- Last ynced at: 2023-03-10T23:55:18.750Z
- Profile URL: https://gitlab.com/gitlab-org
Committers metadata
Last synced: 3 days ago
Total Commits: 518
Total Committers: 48
Avg Commits per committer: 10.792
Development Distribution Score (DDS): 0.728
Commits in past year: 305
Committers in past year: 15
Avg Commits per committer in past year: 20.333
Development Distribution Score (DDS) in past year: 0.639
| Name | Commits | |
|---|---|---|
| Hercules Merscher | h****r@g****m | 141 |
| GitLab Renovate Bot | o****e@g****m | 79 |
| Igor Wiedler | i****r@g****m | 28 |
| Max Woolf | m****f@g****m | 27 |
| Sam Wiskow | s****w@g****m | 25 |
| Stan Hu | s****u@g****m | 23 |
| Bob Van Landuyt | b****b@g****m | 22 |
| Elliot Forbes | e****s@g****m | 20 |
| Matias Alvarez | m****z@g****m | 18 |
| Andrew Newdigate | a****w@g****m | 17 |
| Matthias Kaeppler | m****r@g****m | 17 |
| dbarrett | d****t@g****m | 14 |
| Vitaly Slobodin | v****n@g****m | 9 |
| Takuya Noguchi | t****h@g****m | 9 |
| Bob Van Landuyt | b****b@v****o | 9 |
| andrey | a****s@g****m | 6 |
| Jacob Vosmaer | j****b@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 |
| service-platforms-labkit | s****t@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 |
| Oswaldo Ferreira | o****o@g****m | 2 |
| Rémy Coutable | r****y@r****e | 2 |
| Alex Buijs | a****s@g****m | 1 |
| Ankit Bhatnagar | a****r@g****m | 1 |
| Balasankar "Balu" C | b****r@g****m | 1 |
| and 18 more... | ||
Committer domains:
- gitlab.com: 40
- tuta.io: 1
- rymai.me: 1
- vanlanduyt.co: 1
Issue and Pull Request metadata
Last synced: 3 days ago
Package metadata
- Total packages: 2
-
Total downloads:
- rubygems: 102,776,128 total
- Total docker downloads: 868,405,892
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 757 (may contain duplicates)
- Total versions: 256
- Total maintainers: 3
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: 2.8.1 (published 9 days ago)
- Last Synced: 2026-07-24T16:57:22.856Z (1 day ago)
- Versions: 128
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 51,389,098 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: 2.8.1 (published 9 days ago)
- Last Synced: 2026-07-23T13:02:08.241Z (3 days ago)
- Versions: 128
- Dependent Packages: 0
- Dependent Repositories: 757
- Downloads: 51,387,030 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
- 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.120574645243508