Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,27 @@ jobs:
run: |
deno --allow-all test-other/integration_check_deno.ts

test-bun-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.0.36'

- name: Install dependencies
run: bun install

- name: Check Integration
env:
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }}
DATADOG_SITE: ${{ secrets.DATADOG_API_HOST }}
run: |
bun test-other/integration_check.mjs '-bun'

lint:
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
[![NPM Version][npm-image]][npm-url]
[![Build Status][ci-status-image]][ci-status-url]
[![Downloads Stats][npm-downloads]][npm-url]
![deno compatibility][deno-image]
![Supports Deno 2.1 and Newer][deno-image]
![Supports Bun 1.0 and Newer][bun-image]

Datadog-metrics lets you collect application metrics through Datadog's HTTP API. Using the HTTP API has the benefit that you **don't need to install the Datadog Agent (StatsD)**. Just get an API key, install the module and you're ready to go.

The downside of using the HTTP API is that it can negatively affect your app's performance. Datadog-metrics **solves this issue by buffering metrics locally and periodically flushing them** to Datadog.

## Installation

Datadog-metrics is compatible with Node.js v14 and later and Deno 2.1 and later. You can install it with NPM:
Datadog-metrics is compatible with Node.js v14+, Deno 2.1+, and Bun 1.0+. You can install it with NPM:

```sh
npm install datadog-metrics --save
Expand Down Expand Up @@ -372,13 +373,13 @@ Contributions are always welcome! For more info on how to contribute or develop

**Breaking Changes:**

* The minimum required Node.js version is now v14.0.0 and Deno version is 2.1.0.
* The minimum required Node.js version is now v14.0.0, Deno version is 2.1.0, and Bun version is 1.0.0.

* The `code` property on `AuthorizationError` instances has been changed to `DATADOG_METRICS_AUTHORIZATION_ERROR` for clarity and consistency (it was previously `DATADOG_AUTHORIZATION_ERROR`). If you are using `errorInstance.code` to check types, make sure to update the string you were looking for.

**New Features:**

* Clarify this package is compatible with Deno (>= v2.1). We’ve silently worked on Deno for a long time, but never formally supported it before this release.
* Clarify this package is compatible with Deno (>= v2.1) and Bun (>= 1.0). We’ve silently worked on Deno and Bun for a long time, but never formally supported them before this release.

**Deprecations:**

Expand Down Expand Up @@ -800,4 +801,5 @@ Your contributions are always welcome! See [`CONTRIBUTING.md`](./CONTRIBUTING.md
[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square
[ci-status-image]: https://github.com/dbader/node-datadog-metrics/actions/workflows/ci.yml/badge.svg?branch=main
[ci-status-url]: https://github.com/dbader/node-datadog-metrics/actions/workflows/ci.yml?query=branch%3Amain
[deno-image]: https://shield.deno.dev/deno/^2.1
[deno-image]: https://img.shields.io/badge/Deno-^2.1-blue?logo=deno&color=70ffaf&logoColor=ffffff
[bun-image]: https://img.shields.io/badge/Bun-^1.0-blue?logo=bun&color=f368e0
2 changes: 1 addition & 1 deletion test-other/integration_check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { main } from './integration_check_lib.mjs';

main().catch(error => {
main({ tagSuffix: process.argv[2] || '' }).catch(error => {
process.exitCode = 1;
console.error(error);
});