Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to empty string as Rails 5.1 can't handle nil paths #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.35.1
* Fix bug with Rails 5.1 when calling recognize_path with a nil path

# 0.35.0
* removes record_on_server_receive option
* records status_code and method on all server receive events.
Expand Down
2 changes: 1 addition & 1 deletion lib/zipkin-tracer/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Application
# Determines if our framework knows whether the request will be routed to a controller
def self.routable_request?(env)
return true unless defined?(Rails) # If not running on a Rails app, we can't verify if it is invalid
path_info = env[ZipkinTracer::RackHandler::PATH_INFO]
path_info = env[ZipkinTracer::RackHandler::PATH_INFO] || ""
http_method = env[ZipkinTracer::RackHandler::REQUEST_METHOD]
Rails.application.routes.recognize_path(path_info, method: http_method)
true
Expand Down
2 changes: 1 addition & 1 deletion lib/zipkin-tracer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ZipkinTracer
VERSION = '0.35.0'.freeze
VERSION = '0.35.1'.freeze
end