Skip to content

Commit

Permalink
Fallback to empty string as Rails 5.1 can't handle nil paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ssteeg-mdsol committed Apr 3, 2019
1 parent 717afa5 commit f8cb0e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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

0 comments on commit f8cb0e8

Please sign in to comment.