
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
opentelemetry-instrumentation-mongo
Advanced tools
The OpenTelemetry Mongo Ruby gem is a community maintained instrumentation for Mongo.
Install the gem using:
gem install opentelemetry-instrumentation-mongo
Or, if you use bundler, include opentelemetry-instrumentation-mongo
in your Gemfile
.
To install the instrumentation, call use
with the name of the instrumentation.
OpenTelemetry::SDK.configure do |c|
c.use 'OpenTelemetry::Instrumentation::Mongo'
end
Alternatively, you can also call use_all
to install all the available instrumentation.
OpenTelemetry::SDK.configure do |c|
c.use_all
end
OpenTelemetry::SDK.configure do |c|
c.use 'OpenTelemetry::Instrumentation::Mongo', {
# Sets how db_statement appears in your traces. The options are:
# :obfuscate - (default) query parameters are visible, but values are masked.
# :include - query parameters and values are both fully visible.
# :omit - db_statement is omitted entirely.
db_statement: :include,
}
end
To run the example:
docker-compose up mongo
cd
to the examples directory and install gems
cd example
bundle install
ruby mongo.rb
This will run a few MongoDB commands, printing OpenTelemetry traces to the console as it goes.
The opentelemetry-instrumentation-mongo
gem source is on github, along with related gems including opentelemetry-api
and opentelemetry-sdk
.
The OpenTelemetry Ruby gems are maintained by the OpenTelemetry Ruby special interest group (SIG). You can get involved by joining us on our GitHub Discussions, Slack Channel or attending our weekly meeting. See the meeting calendar for dates and times. For more information on this and other language SIGs, see the OpenTelemetry community page.
Apache 2.0 license. See LICENSE for more information.
FAQs
Unknown package
We found that opentelemetry-instrumentation-mongo demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.