You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,36 +336,45 @@ Contributions are always welcome! For more info on how to contribute or develop
336
336
337
337
## Release History
338
338
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.
340
342
341
343
**Breaking Changes:**
342
344
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)
344
346
345
347
**New Features:**
346
348
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:
348
350
349
351
* The `flush()` method now returns a promise.
350
352
* 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.
351
353
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)
353
355
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.
355
357
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
+
```
357
366
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)
359
368
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)
361
370
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:**
363
372
364
-
**Maintenance:**
373
+
* The `appKey` option is no longer supported. Applicationkeys (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)
365
374
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)
0 commit comments