File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -577,18 +577,21 @@ def open
577577 # all generate auth failures if the bind was unsuccessful.
578578 raise Net ::LDAP ::LdapError , "Open already in progress" if @open_connection
579579
580- begin
581- @open_connection =
582- Net ::LDAP ::Connection . new \
583- :host => @host ,
584- :port => @port ,
585- :encryption => @encryption ,
586- :instrumentation_service => @instrumentation_service
587- @open_connection . bind ( @auth )
588- yield self
589- ensure
590- @open_connection . close if @open_connection
591- @open_connection = nil
580+ instrument "open.net_ldap" do |payload |
581+ begin
582+ @open_connection =
583+ Net ::LDAP ::Connection . new \
584+ :host => @host ,
585+ :port => @port ,
586+ :encryption => @encryption ,
587+ :instrumentation_service => @instrumentation_service
588+ payload [ :connection ] = @open_connection
589+ payload [ :bind ] = @open_connection . bind ( @auth )
590+ yield self
591+ ensure
592+ @open_connection . close if @open_connection
593+ @open_connection = nil
594+ end
592595 end
593596 end
594597
You can’t perform that action at this time.
0 commit comments