
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
This gem provides a Rack middleware for InfluxDB.
Add this line to your application's Gemfile:
gem 'rack-influxdb'
Then run:
bundle
The Rack::InfluxDB gem can be easily configured
Rack::InfluxDB.configure do |config|
# The name of your measurement
config.name = "http_requests"
# Custom tags
config.tags = { app: "my-awesome-api", env: "production" }
# The URL of your InfluxDB instance
config.url = "https://test.influxdb.example.com"
# The API token provided by InfluxDB
config.token = "topsecret"
# A lambda that returns a hash containing the fields to write.
# E.g. to just track the HTTP status:
config.fields = lambda { |env, response| return { status: response[0] } }
# Handle errors individually
config.handle_errors = lambda { |err| report_error(err) }
# Options like Org, Bucket and Precision
config.options = {
org: 'my-org',
bucket: 'my-bucket',
precision: InfluxDB2::WritePrecision::MILLISECOND
}
# Write options - it's highly recommended to use batching and not
# synchronous writing.
config.write_options = {
write_type: InfluxDB2::WriteType::BATCHING,
batch_size: 1_000
}
end
All you have to do is to include the middleware in your Rack stack.
In Rails:
# config/application.rb
class Application < Rails::Application
...
config.middleware.use Rack::InfluxDB
end
FAQs
Unknown package
We found that rack-influxdb 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.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.