Merge pull request #14751 from MikeMcQuaid/analytics_tweak_constants

utils/analytics: tweaks constants.
This commit is contained in:
Mike McQuaid 2023-02-22 11:40:39 +00:00 committed by GitHub
commit 8948a3a6e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,15 +11,16 @@ module Utils
#
# @api private
module Analytics
INFLUX_BUCKET = "analytics"
INFLUX_TOKEN = "9eMkCRwRWS7xjPR_HbF5tBffKmnyRFSup7rq41tHZLOpnBsjVtRFd-y9R_P9OCcB3kr1ftDEzxcxTehcufy1SQ=="
INFLUX_HOST = "https://europe-west1-1.gcp.cloud2.influxdata.com"
INFLUX_ORG = "9a707721bb47fc02"
class << self
extend T::Sig
include Context
INFLUX_BUCKET = "analytics"
INFLUX_TOKEN = "9eMkCRwRWS7xjPR_HbF5tBffKmnyRFSup7rq41tHZLOpnBsjVtRFd-y9R_P9OCcB3kr1ftDEzxcxTehcufy1SQ=="
INFLUX_HOST = "europe-west1-1.gcp.cloud2.influxdata.com"
sig { params(type: Symbol, metadata: T::Hash[Symbol, T.untyped]).void }
def report_google(type, metadata = {})
analytics_ids = ENV.fetch("HOMEBREW_ANALYTICS_IDS", "").split(",")
@ -93,7 +94,7 @@ module Utils
"--data-raw", "#{measurement},#{tags} count=1i #{Time.now.to_i}"
]
url = "https://#{INFLUX_HOST}/api/v2/write?bucket=#{INFLUX_BUCKET}&precision=s"
url = "#{INFLUX_HOST}/api/v2/write?bucket=#{INFLUX_BUCKET}&precision=s"
deferred_curl(url, args)
end