![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Remnant hooks into your Rails and discovers your hidden statistics.
These stats are sent to statsd: request, action, view, gc, db, filters
Using bundler:
gem 'remnant'
Add an initializer to configure (or call configure during application startup):
Remnant.configure do
# hostname of statsd server
host "https://remnant.statsd"
# port of statsd server
port 8125
# app name or other unique key for multiple app usage
tagged "custom"
# environment of application, defaults to Rails.env
# included in payload
environment "production"
hook do |results|
# custom hook to run after each remnant capture with results
# results = {key => ms, key2 => ms2}
end
end
Remnant::Rails.setup! # needed if on Rails 2.3.x
If you want to capture the times it takes to render templates/partials you should enable Template capturing in a before filter (or before rendering takes place)
before_filter {|c| Remnant::Template.enable! }
If you want to capture the sql query times you should enable Database capturing in a before filter (or before any database calls take place)
before_filter {|c| Remnant::Database.enable! }
Below is a way to use all captured information remnant offers
hook do |results|
results.map do |key, ms|
# loop through specially captures results
# [request, action, view]
end
# total time for db
Remnant::Database.total_time.to_i
# total time for all filters
Remnant::Filters.total_time.to_i
# time for individual filters
# [{:type => 'before|after|round',
# :name => filter_name,
# :time => microseconds,
# :ms => ms
# }]
Remnant::Filters.filters.to_json
# time for individual templates/partials
# [view => {'time' => ms,
# 'exclusive' => ms,
# 'depth' => depth,
# 'children' => []
# }]
if Remnant::Template.enabled?
Remnant::Template.trace.root.children.map(&:results).to_json
end
# time for sql queries
if Remnant::Database.enabled?
queries = Remnant::Database.queries.map {|q| {:sql => q.sql, :ms => q.time * 1000}}
end
# time spent in GC and number of collection attempts
Remnant::GC.time.to_i
Remnant::GC.collections.to_i
end
Remnant logs to statsd only if your environment is production, demo or staging. For all other environments it logs via Rails.logger.info
Original author: John "asceth" Long
FAQs
Unknown package
We found that remnant 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.