Skip to content

Commit 94500b3

Browse files
committed
feat: @sentry/integration-node-mongodb package
Add package to package.json workspaces list fix: Update all relevant tests
1 parent b7382a2 commit 94500b3

File tree

11 files changed

+568
-0
lines changed

11 files changed

+568
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"packages/gatsby",
2929
"packages/hub",
3030
"packages/integrations",
31+
"packages/integration-node-mongodb",
3132
"packages/minimal",
3233
"packages/nextjs",
3334
"packages/next-plugin-sentry",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
es6: true,
5+
node: true,
6+
},
7+
parserOptions: {
8+
ecmaVersion: 2018,
9+
},
10+
extends: ['@sentry-internal/sdk'],
11+
ignorePatterns: ['build/**', 'dist/**', 'esm/**', 'examples/**', 'scripts/**', 'test/manual/**'],
12+
overrides: [
13+
{
14+
files: ['*.ts', '*.tsx', '*.d.ts'],
15+
parserOptions: {
16+
project: './tsconfig.json',
17+
},
18+
},
19+
{
20+
files: ['test/**'],
21+
rules: {
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
'@typescript-eslint/no-non-null-assertion': 'off',
24+
},
25+
},
26+
{
27+
files: ['test/**/*.js'],
28+
rules: {
29+
'import/order': 'off',
30+
},
31+
},
32+
],
33+
rules: {
34+
'prefer-rest-params': 'off',
35+
'@typescript-eslint/no-var-requires': 'off',
36+
'@sentry-internal/sdk/no-async-await': 'off',
37+
},
38+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*
2+
!/dist/**/*
3+
!/esm/**/*
4+
*.tsbuildinfo
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2019, Sentry
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br />
6+
</p>
7+
8+
# Official Sentry SDK Integration for MongoDB
9+
10+
[![npm version](https://img.shields.io/npm/v/@sentry/integration-node-mongodb.svg)](https://www.npmjs.com/package/@sentry/integration-node-mongodb)
11+
[![npm dm](https://img.shields.io/npm/dm/@sentry/integration-node-mongodb.svg)](https://www.npmjs.com/package/@sentry/integration-node-mongodb)
12+
[![npm dt](https://img.shields.io/npm/dt/@sentry/integration-node-mongodb.svg)](https://www.npmjs.com/package/@sentry/integration-node-mongodb)
13+
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
14+
15+
## Links
16+
17+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
18+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
19+
20+
## Usage
21+
22+
```js
23+
const Sentry = require("@sentry/node");
24+
const Tracing = require("@sentry/tracing");
25+
const Mongo = require("@sentry/integration-node-mongodb");
26+
27+
Sentry.init({
28+
dsn: '__PUBLIC_DSN__',
29+
integrations: [
30+
new Mongo(),
31+
],
32+
tracesSampleRate: 1.0,
33+
});
34+
```
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"name": "@sentry/integration-node-mongodb",
3+
"version": "6.3.1",
4+
"description": "Official Sentry SDK Integration for MongoDB",
5+
"repository": "git://github.com/getsentry/sentry-javascript.git",
6+
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/integration-node-mongodb",
7+
"author": "Sentry",
8+
"license": "BSD-3-Clause",
9+
"engines": {
10+
"node": ">=6"
11+
},
12+
"main": "dist/index.js",
13+
"module": "esm/index.js",
14+
"types": "dist/index.d.ts",
15+
"publishConfig": {
16+
"access": "public"
17+
},
18+
"dependencies": {
19+
"@sentry/hub": "6.3.1",
20+
"@sentry/types": "6.3.1",
21+
"@sentry/utils": "6.3.1",
22+
"tslib": "^1.9.3"
23+
},
24+
"devDependencies": {
25+
"@sentry-internal/eslint-config-sdk": "6.3.1",
26+
"@types/node": "~10.17.0",
27+
"eslint": "7.6.0",
28+
"jest": "^24.7.1",
29+
"npm-run-all": "^4.1.2",
30+
"prettier": "1.19.0",
31+
"rimraf": "^2.6.3",
32+
"typescript": "3.7.5"
33+
},
34+
"scripts": {
35+
"build": "run-p build:es5 build:esm",
36+
"build:es5": "tsc -p tsconfig.build.json",
37+
"build:esm": "tsc -p tsconfig.esm.json",
38+
"build:watch": "run-p build:watch:es5 build:watch:esm",
39+
"build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
40+
"build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput",
41+
"clean": "rimraf dist coverage",
42+
"link:yarn": "yarn link",
43+
"lint": "run-s lint:prettier lint:eslint",
44+
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
45+
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
46+
"fix": "run-s fix:eslint fix:prettier",
47+
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
48+
"fix:eslint": "eslint . --format stylish --fix",
49+
"test": "run-s test:jest",
50+
"test:jest": "jest",
51+
"test:watch": "jest --watch",
52+
"pack": "npm pack"
53+
},
54+
"volta": {
55+
"extends": "../../package.json"
56+
},
57+
"jest": {
58+
"collectCoverage": true,
59+
"transform": {
60+
"^.+\\.ts$": "ts-jest"
61+
},
62+
"moduleFileExtensions": [
63+
"js",
64+
"ts"
65+
],
66+
"testEnvironment": "node",
67+
"testMatch": [
68+
"**/*.test.ts"
69+
],
70+
"globals": {
71+
"ts-jest": {
72+
"tsConfig": "./tsconfig.json",
73+
"diagnostics": false
74+
}
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)