@rxap/nest-sentry 11.0.0-dev.13 → 11.0.0-dev.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/package.json +6 -6
- package/src/lib/sentry-init-hook.d.ts +2 -1
- package/src/lib/sentry-init-hook.js +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [11.0.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@11.0.0-dev.14...@rxap/nest-sentry@11.0.0-dev.15) (2026-01-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/nest-sentry
|
|
9
|
+
|
|
10
|
+
# [11.0.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@11.0.0-dev.13...@rxap/nest-sentry@11.0.0-dev.14) (2025-11-27)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **sentry:** add callback functionality to sentryInitHook ([095cb88](https://gitlab.com/rxap/packages/commit/095cb886de91ba8a179457a3df72b79385ff63ef))
|
|
15
|
+
|
|
6
16
|
# [11.0.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/nest-sentry@11.0.0-dev.12...@rxap/nest-sentry@11.0.0-dev.13) (2025-11-21)
|
|
7
17
|
|
|
8
18
|
### Features
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "11.0.0-dev.
|
|
2
|
+
"version": "11.0.0-dev.15",
|
|
3
3
|
"name": "@rxap/nest-sentry",
|
|
4
4
|
"description": "This package provides a Sentry integration for NestJS applications. It includes a logger, interceptor, and module to simplify error tracking and performance monitoring with Sentry. It offers configurable options for setting up Sentry in your NestJS application.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nx/devkit": "20.5.0",
|
|
8
|
-
"@rxap/ts-morph": "^1.6.0-dev.
|
|
9
|
-
"@rxap/workspace-utilities": "^19.8.1-dev.
|
|
8
|
+
"@rxap/ts-morph": "^1.6.0-dev.3",
|
|
9
|
+
"@rxap/workspace-utilities": "^19.8.1-dev.3",
|
|
10
10
|
"tslib": "2.6.2"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@nestjs/config": "^4.0.2",
|
|
15
15
|
"@nestjs/core": "^11.1.1",
|
|
16
16
|
"@rxap/nest-logger": "^11.0.0-dev.6",
|
|
17
|
-
"@rxap/nest-utilities": "^11.0.0-dev.
|
|
17
|
+
"@rxap/nest-utilities": "^11.0.0-dev.8",
|
|
18
18
|
"@sentry/core": "^8.55.0",
|
|
19
19
|
"@sentry/nestjs": "^8.55.0",
|
|
20
20
|
"@sentry/node": "^8.55.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"package": "@rxap/nest-utilities",
|
|
88
|
-
"version": "11.0.0-dev.
|
|
88
|
+
"version": "11.0.0-dev.8"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"package": "@rxap/utilities",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
},
|
|
129
129
|
"schematics": "./generators.json",
|
|
130
130
|
"type": "commonjs",
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "69d6ee61a20632f52b77de621089334a34f45e03",
|
|
132
132
|
"types": "./src/index.d.ts",
|
|
133
133
|
"main": "./src/index.js"
|
|
134
134
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Environment } from '@rxap/nest-utilities';
|
|
2
|
+
import { NodeClient } from '@sentry/node';
|
|
2
3
|
import type { NodeOptions } from '@sentry/node/build/types/types';
|
|
3
|
-
export declare function sentryInitHook(options?: Partial<NodeOptions
|
|
4
|
+
export declare function sentryInitHook<AppOptions = any>(options?: Partial<NodeOptions>, callback?: (client: NodeClient | undefined, options: AppOptions, environment: Environment) => void): (appOptions: any, environment: Environment) => void;
|
|
@@ -5,13 +5,13 @@ const Sentry = require("@sentry/nestjs");
|
|
|
5
5
|
const profiling_node_1 = require("@sentry/profiling-node");
|
|
6
6
|
const determine_sentry_environment_1 = require("./determine-sentry-environment");
|
|
7
7
|
const determine_sentry_release_1 = require("./determine-sentry-release");
|
|
8
|
-
function sentryInitHook(options = {}) {
|
|
9
|
-
return (
|
|
8
|
+
function sentryInitHook(options = {}, callback) {
|
|
9
|
+
return (appOptions, environment) => {
|
|
10
10
|
const dsn = process.env['SENTRY_DSN'] ?? environment.sentry?.dsn;
|
|
11
11
|
if (!dsn) {
|
|
12
12
|
console.warn('No sentry dsn provided.');
|
|
13
13
|
}
|
|
14
|
-
Sentry.init({
|
|
14
|
+
const client = Sentry.init({
|
|
15
15
|
dsn,
|
|
16
16
|
enabled: process.env['SENTRY_ENABLED'] === 'true' ||
|
|
17
17
|
(environment.sentry?.enabled ?? false),
|
|
@@ -31,5 +31,8 @@ function sentryInitHook(options = {}) {
|
|
|
31
31
|
enableLogs: true,
|
|
32
32
|
...options,
|
|
33
33
|
});
|
|
34
|
+
if (callback) {
|
|
35
|
+
callback(client, appOptions, environment);
|
|
36
|
+
}
|
|
34
37
|
};
|
|
35
38
|
}
|