class NewRelic::Agent::Utilization::GCP
Constants
- MACH_TYPE
- ZONE
Public Instance Methods
prepare_response(response)
click to toggle source
# File lib/new_relic/agent/utilization/gcp.rb, line 20 def prepare_response(response) body = JSON.parse(response.body) body[MACH_TYPE] = trim_leading(body[MACH_TYPE]) body[ZONE] = trim_leading(body[ZONE]) body end
trim_leading(value)
click to toggle source
# File lib/new_relic/agent/utilization/gcp.rb, line 27 def trim_leading(value) value.split(NewRelic::SLASH).last end