Class: DatadogExporter::Client
- Inherits:
-
Object
- Object
- DatadogExporter::Client
- Defined in:
- lib/datadog_exporter/client.rb,
lib/datadog_exporter/client/config.rb
Overview
The client that makes the actual requests to the DatadogAPIClient. ‘config` is an instance of `DatadogApi::Client::Config::Base`
Defined Under Namespace
Classes: Config
Instance Method Summary collapse
-
#datadog_client ⇒ DatadogAPIClient::APIClient
Creates the Datadog API client.
-
#initialize(config: DatadogExporter::Client::Config.new) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(config: DatadogExporter::Client::Config.new) ⇒ Client
Returns a new instance of Client.
8 9 10 |
# File 'lib/datadog_exporter/client.rb', line 8 def initialize(config: DatadogExporter::Client::Config.new) @datadog_config = config.datadog_api_configuration end |
Instance Method Details
#datadog_client ⇒ DatadogAPIClient::APIClient
Creates the Datadog API client
See github.com/DataDog/datadog-api-client-ruby/blob/master/lib/datadog_api_client/api_client.rb
17 18 19 |
# File 'lib/datadog_exporter/client.rb', line 17 def datadog_client @datadog_client ||= DatadogAPIClient::APIClient.new(@datadog_config) end |