Skip to content

Commit

Permalink
sudomain is no longer needed for api requests
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Nov 8, 2023
1 parent 52491ec commit cfd5850
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/kennel/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def self.tag(api_resource, reply)
def initialize(app_key = nil, api_key = nil)
@app_key = app_key || ENV.fetch("DATADOG_APP_KEY")
@api_key = api_key || ENV.fetch("DATADOG_API_KEY")
url = Utils.path_to_url("", subdomain: "app")
url = Utils.path_to_url("")
@client = Faraday.new(url: url) { |c| c.adapter :net_http_persistent }
end

Expand Down
4 changes: 2 additions & 2 deletions lib/kennel/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def capture_sh(command)
result
end

def path_to_url(path, subdomain: nil)
subdomain ||= (ENV["DATADOG_SUBDOMAIN"] || "app")
def path_to_url(path)
subdomain = (ENV["DATADOG_SUBDOMAIN"] || "app")
"https://#{subdomain}.datadoghq.com#{path}"
end

Expand Down

0 comments on commit cfd5850

Please sign in to comment.