
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
yabeda-prometheus-mmap
Advanced tools
Adapter for easy exporting your collected metrics from your application to the Prometheus! It is based on Prometheus Ruby Mmap Client, that uses mmap'ed files to share metrics from multiple processes. This allows efficient metrics processing for Ruby web apps running in multiprocess setups like Unicorn or Puma (clustered mode).
Add this line to your application's Gemfile:
gem 'yabeda-prometheus-mmap'
And then execute:
$ bundle
Exporting from running web servers:
Place following in your config.ru
before running your application:
require 'yabeda/prometheus/mmap'
use Yabeda::Prometheus::Exporter
Metrics will be available on /metrics
path (configured by :path
option).
Also you can mount it in Rails application routes as standalone Rack application.
Run web-server from long-running processes (delayed jobs, …):
require 'yabeda/prometheus/mmap'
Yabeda::Prometheus::Exporter.start_metrics_server!
WEBrick will be launched in separate thread and will serve metrics on /metrics
path.
See yabeda-sidekiq for example.
Listening address is configured via PROMETHEUS_EXPORTER_BIND
env variable (default is 0.0.0.0
).
Port is configured by PROMETHEUS_EXPORTER_PORT
or PORT
variables (default is 9394
).
yabeda_prometheus_mmap_render_duration
.These are only enabled in debug mode. See Yabeda debugging metrics on how to enable it (e.g. by specifying YABEDA_DEBUG=true
in your environment variables).
Get local development environment working and tests running is very easy with docker-compose:
docker-compose run app bundle
docker-compose run app bundle exec rspec
Bug reports and pull requests are welcome on GitHub at https://github.com/yabeda-rb/yabeda-prometheus-mmap.
Bump version number in lib/yabeda/prometheus/mmap/version.rb
In case of pre-releases keep in mind rubygems/rubygems#3086 and check version with command like Gem::Version.new(Yabeda::Prometheus::Mmap::VERSION).to_s
Fill CHANGELOG.md
with missing changes, add header with version and date.
Make a commit:
git add lib/yabeda/prometheus/mmap/version.rb CHANGELOG.md
version=$(ruby -r ./lib/yabeda/prometheus/mmap/version.rb -e "puts Gem::Version.new(Yabeda::Prometheus::Mmap::VERSION)")
git commit --message="${version}: " --edit
Create annotated tag:
git tag v${version} --annotate --message="${version}: " --edit --sign
Fill version name into subject line and (optionally) some description (list of changes will be taken from changelog and appended automatically)
Push it:
git push --follow-tags
GitHub Actions will create a new release, build and push gem into RubyGems! You're done!
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that yabeda-prometheus-mmap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.