Skip to content

Commit

Permalink
Fix version 0.10.0 error: datadogApiClient.createConfiguration is not…
Browse files Browse the repository at this point in the history
… a function
  • Loading branch information
gquinteros93 authored Sep 11, 2022
1 parent 4c29447 commit 6c15e7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/reporters.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
const debug = require('debug')('metrics');
const datadogApiClient = require('@datadog/datadog-api-client').v1;
const datadogApiClient = require('@datadog/datadog-api-client');
const callbackify = require('util').callbackify;
let metricsApi;

Expand Down Expand Up @@ -31,13 +31,13 @@ function DataDogReporter(apiKey, appKey) {
throw new Error('DATADOG_API_KEY environment variable not set');
}

const configuration = datadogApiClient.createConfiguration({
const configuration = datadogApiClient.client.createConfiguration({
authMethods: {
apiKeyAuth: apiKey,
appKeyAuth: appKey
}
});
metricsApi = new datadogApiClient.MetricsApi(configuration);
metricsApi = new datadogApiClient.v1.MetricsApi(configuration);
}

DataDogReporter.prototype.report = function(series, onSuccess, onError) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"mocha": "2.4.5"
},
"dependencies": {
"@datadog/datadog-api-client": "^1.0.0-beta.5",
"@datadog/datadog-api-client": "1.3.0",
"debug": "3.1.0"
}
}

0 comments on commit 6c15e7b

Please sign in to comment.