lib/coverband-service-client.rb in coverband-service-client-0.0.12.rc.1 vs lib/coverband-service-client.rb in coverband-service-client-0.0.12.rc.2
- old
+ new
@@ -44,10 +44,11 @@
def initialize(coverband_url, opts = {})
super()
@coverband_url = coverband_url
@process_type = opts.fetch(:process_type) { $PROGRAM_NAME&.split('/')&.last || COVERBAND_PROCESS_TYPE }
@hostname = opts.fetch(:hostname) { ENV["DYNO"] || Socket.gethostname.force_encoding('utf-8').encode }
+ @hostname = @hostname.gsub("'",'').gsub("’",'')
@runtime_env = opts.fetch(:runtime_env) { COVERBAND_ENV }
initialize_stats
end
def initialize_stats
@@ -62,11 +63,11 @@
@stats.emit_point(
'coverband.save.time',
timing,
host: hostname,
- env: runtime_env,
- client: "coverband_#{self.class.name.split("::").last}")
+ device: "coverband_#{self.class.name.split("::").last}",
+ options: {tags: [runtime_env]})
end
def logger
Coverband.configuration.logger
end