Skip to content

Commit

Permalink
Add support for instrumenting NestJs apps
Browse files Browse the repository at this point in the history
- Also, add support for excluding default labels if needed.
  • Loading branch information
chtushar authored Nov 2, 2023
1 parent f63acb0 commit 8df33b8
Show file tree
Hide file tree
Showing 11 changed files with 3,173 additions and 2,219 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.0] - 2023-11-2

### Added

- Add `excludeDefaultLabels` to the options.
- Add support to instrument `NestJS` applications.

### Changed

- Migrate from Rollup to tsup for building package.

## [0.3.0] - 2023-10-9

### Added

- Add `extractLabels` to the options to extract any labels from the URL params such as a tenant or org name allowing support for multi-tenant monitoring.
-
- Gracefully shutdown metrics server

## [0.2.2] - 2023-08-28
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ npm install --save @last9/openapm@latest

1. [Express](#express)
2. [MySQL](#mysql)
3. [NestJS](#nestjs)

### Express

Expand Down Expand Up @@ -42,6 +43,14 @@ Ensure to add this line of code before you initialize db `connection/pool/poolCl
openapm.instrument('mysql');
```
### NestJS
OpenAPM currently supports RED Metrics for NestJS v4 and above.
```js
openapm.instrument('nestjs')
```
## Options
### Usage
Expand Down Expand Up @@ -102,6 +111,13 @@ const openapm = new OpenAPM({
customPathsToMask: [/\b\d+(?:,\d+)*\b/gm] // Accepts an array of Regex
}
```
9. `excludeDefaultLabels`: (Optional) Provide labels to exclude from the default labels
```js
{
...
excludeDefaultLabels: ['environment', 'version']
}
```

## Setup locally

Expand Down
Loading

0 comments on commit 8df33b8

Please sign in to comment.