Skip to content

Commit

Permalink
Prepare to release v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr0grog committed Dec 5, 2024
1 parent 64a6249 commit 64e2154
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,36 +336,40 @@ Contributions are always welcome! For more info on how to contribute or develop

## Release History

* In Development:
* 0.12.0 (2024-12-5)

Datadog-metrics now automatically retries failed metric submissions and uses promises for asynchronous actions! There are a handful of other deprecations and small improvements.

**Breaking Changes:**

* 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!

**New Features:**

* 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:
* 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:

* The `flush()` method now returns a promise.
* 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.

* 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.
* 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:

```js
metrics.init({
// How many times to retry. To disable retries set this to 0.
retries: 2,
// How long (in seconds) to wait between retries. Subsequent retries wait for exponentially longer.
retryBackoff: 1
})

* 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`.
* 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`.

**Deprecations:**

* 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.

**Bug Fixes:**

* 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.

**Maintenance:**

* Buffer metrics using `Map` instead of a plain object.
* 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).

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

* 0.11.4 (2024-11-10)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "datadog-metrics",
"version": "0.12.0-dev",
"version": "0.12.0",
"description": "Buffered metrics reporting via the Datadog HTTP API",
"main": "index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 64e2154

Please sign in to comment.