Skip to content

Commit 050feaa

Browse files
committed
Prepare to release v0.12.0
1 parent 64a6249 commit 050feaa

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -336,36 +336,45 @@ Contributions are always welcome! For more info on how to contribute or develop
336336

337337
## Release History
338338

339-
* In Development:
339+
* 0.12.0 (2024-12-5)
340+
341+
Datadog-metrics now automatically retries failed metric submissions and uses promises for asynchronous actions! There are a handful of other deprecations and small improvements.
340342

341343
**Breaking Changes:**
342344

343-
* The `DatadogReporter` constructor now takes an options object instead of positional arguments. Using this constructor directly is pretty rare, so this likely doesn’t affect you!
345+
* The `DatadogReporter` constructor now takes an options object instead of positional arguments. Using this constructor directly is pretty rare, so this likely doesn’t affect you! (#138)
344346

345347
**New Features:**
346348

347-
* Promises: asynchronous actions now use promises instead of callbacks. In places where `onSuccess` and `onError` callbacks were used, they are now deprecated. Instead, those methods return promises (callbacks still work, but support will be removed in a future release). This affects:
349+
* Promises: asynchronous actions now use promises instead of callbacks. Callbacks are deprecated, but still work — they’ll be fully removed in v0.13.0. This affects:
348350

349351
* The `flush()` method now returns a promise.
350352
* The `report(series)` method on any custom reporters should now return a promise. For now, datadog-metrics will use the old callback-based behavior if the method signature has callbacks listed after `series` argument.
351353

352-
* Retries: flushes to Datadog’s API are now retried automatically. This can help you work around intermittent network issues or rate limits. To adjust retries, use the `retries` and `retryBackoff` options.
354+
(See #125)
353355

354-
* Environment variables can now be prefixed with *either* `DATADOG_` or `DD_` (previously, only `DATADOG_` worked) in order to match configuration with the Datadog agent. For example, you can set your API key via `DATADOG_API_KEY` or `DD_API_KEY`.
356+
* Retries: flushes to Datadog’s API are now retried automatically. This can help you work around intermittent network issues or rate limits. To adjust retries, use the `retries` and `retryBackoff` options.
355357

356-
**Deprecations:**
358+
```js
359+
metrics.init({
360+
// How many times to retry. To disable retries, set this to 0.
361+
retries: 2,
362+
// How long (in seconds) to wait between retries. Subsequent retries wait for exponentially longer.
363+
retryBackoff: 1
364+
});
365+
```
357366

358-
* The `appKey` option is no longer supported. Application keys (as opposed to API keys) are not actually needed for sending metrics or distributions to the Datadog API. Including it in your configuration adds no benefits, but risks exposing a sensitive credential.
367+
(See #138)
359368

360-
**Bug Fixes:**
369+
* Environment variables: you can now use *either* `DATADOG_` or `DD_` prefixes for environment variables (previously, only `DATADOG_` worked). For example, you can set your API key via `DATADOG_API_KEY` or `DD_API_KEY`. (#137)
361370

362-
* Support setting the `site` option via the `DATADOG_SITE` environment variable. The `apiHost` option was renamed to `site` in v0.11.0, but the `DATADOG_API_HOST` environment variable was accidentally left as-is. The old environment variable name is now deprecated, and will be removed at the same time as the `apiHost` option is removed.
371+
**Deprecations:**
363372

364-
**Maintenance:**
373+
* The `appKey` option is no longer supported. Application keys (as opposed to API keys) are not actually needed for sending metrics or distributions to the Datadog API. Including it in your configuration adds no benefits, but risks exposing a sensitive credential. (#127)
365374

366-
* Buffer metrics using `Map` instead of a plain object.
375+
* The `DATADOG_API_HOST` environment variable is now deprecated. Please use `DATADOG_SITE` or `DD_SITE` instead (the `apiHost` option was renamed to `site` in v0.11.0, but the `DATADOG_API_HOST` environment variable was accidentally left as-is). (#134)
367376

368-
[View diff](https://github.com/dbader/node-datadog-metrics/compare/v0.11.4...main)
377+
[View diff](https://github.com/dbader/node-datadog-metrics/compare/v0.11.4...v0.12.0)
369378

370379
* 0.11.4 (2024-11-10)
371380

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datadog-metrics",
3-
"version": "0.12.0-dev",
3+
"version": "0.12.0",
44
"description": "Buffered metrics reporting via the Datadog HTTP API",
55
"main": "index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)