mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-07 22:33:55 +02:00
tracing: add opentracing for rack and dyndnsd with configurable jaeger-client support and spanmanager
This commit is contained in:
@@ -9,14 +9,19 @@ module Dyndnsd
|
||||
end
|
||||
|
||||
def update(zone)
|
||||
# write zone file in bind syntax
|
||||
File.open(@zone_file, 'w') { |f| f.write(@generator.generate(zone)) }
|
||||
# call user-defined command
|
||||
pid = fork do
|
||||
exec @command
|
||||
Helper.span('updater_update') do |span|
|
||||
span.set_tag('dyndnsd.updater.name', self.class.name.split('::').last)
|
||||
|
||||
# write zone file in bind syntax
|
||||
File.open(@zone_file, 'w') { |f| f.write(@generator.generate(zone)) }
|
||||
# call user-defined command
|
||||
pid = fork do
|
||||
exec @command
|
||||
end
|
||||
|
||||
# detach so children don't become zombies
|
||||
Process.detach(pid)
|
||||
end
|
||||
# detach so children don't become zombies
|
||||
Process.detach(pid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user