Tags: dbader/node-datadog-metrics
Tags
Version 0.12.1 When auto-flushing is enabled, metrics are now also flushed before the process exits. In previous versions, you needed to do this manually by calling `metrics.flush()` at the every end of your program. (#141) You will still need to flush manually if you set `flushIntervalSeconds` to `0` or `stop()` (see below) if you are quitting your program by calling `process.exit()` [(which interrupts a variety of operations)](https://nodejs.org/docs/latest/api/process.html#processexitcode). A new `stop()` method disables auto-flushing and flushes any currently buffered metrics (you can leave metrics in the buffer instead with the `flush` option: `stop({flush: false})`). (#141)
Version 0.12.0 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! (#138) **New Features:** * 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. (See #125) * 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 exponentially longer. retryBackoff: 1 }); ``` (See #138) * 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) **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. (#127) * 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)
Version 0.11.4 This release updates the TypeScript types for this project, and doesn’t include any changes to functionality. There are also no changes since v0.11.4-a.1. **Bug Fixes:** * `BufferedMetricsLogger` is now an actual class & type when you import it in TypeScript. That is, you can now do: ```typescript import { BufferedMetricsLogger } from 'datadog-metrics'; function useLogger(logger: BufferedMetricsLogger) { // ... } ``` Previously, you would have had to declare the type for `logger` as `typeof BufferedMetricsLogger.prototype`. (#120) [View diff](v0.11.3...v0.11.4)
Version 0.11.2 * Fix types and documentation for the `aggregates` option for histograms and the `histogram.aggregates` option for the library as a whole. It was previously listed as `aggregations`, which was incorrect. (Thanks to @Calyhre in #117.) * Improve documentation and add a more detailed error message about API keys vs. application keys. (#118)
Version 0.11.1 **Fixes & Maintenance:** * Resolve a deprecation warning from the underlying datadog-api-client library. This also updates the minimum required version of that library. (Thanks to @acatalucci-synth & @fcsonline in #112.)
v0.11.0 **New Features:** * Built-in TypeScript definitions. If you use TypeScript, you no longer need to install separate type definitions from `@types/datadog-metrics` — they’re now built-in. Please make sure to remove `@types/datadog-metrics` from your dev dependencies. Even if you’re writing regular JavaScript, you should now see better autocomplete suggestions and documentation in editors that support TypeScript definitions (e.g. VisualStudio Code, WebStorm). **Breaking Changes:** * datadog-metrics now uses modern `class` syntax internally. In most cases, you shouldn’t need to change anything. However, if you are calling `BufferedMetricsLogger.apply(...)` or `BufferedMetricsLogger.call(...)`, you’ll need to change your code to use `new BufferedMetricsLogger(...)` instead. **Deprecated Features:** * The `apiHost` option has been renamed to `site` so that it matches up with Datadog docs and official packages. The old `apiHost` name still works for now, but will be removed in the future. * The `reporters.DataDogReporter` class has been renamed to `reporters.DatadogReporter` (lower-case D in "dog") so that it correctly matches Datadog’s actual name. The old name still works, but will be removed in the future. [View diff](v0.10.2...v0.11.0)
PreviousNext