Skip to content

Commit 87aa39f

Browse files
committed
feat(otel): Add initial package for otel
1 parent 0576852 commit 87aa39f

File tree

13 files changed

+172
-0
lines changed

13 files changed

+172
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"packages/nextjs",
4747
"packages/node",
4848
"packages/node-integration-tests",
49+
"packages/opentelemetry-node",
4950
"packages/react",
5051
"packages/remix",
5152
"packages/serverless",
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
},
5+
extends: ['../../.eslintrc.js'],
6+
rules: {
7+
'@sentry-internal/sdk/no-async-await': 'off',
8+
},
9+
};

packages/opentelemetry-node/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2022 Sentry (https://sentry.io) and individual contributors. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6+
persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9+
Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

packages/opentelemetry-node/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
# Official Sentry SDK for OpenTelemetry Node
8+
9+
[![npm version](https://img.shields.io/npm/v/@sentry/opentelemetry-node.svg)](https://www.npmjs.com/package/@sentry/opentelemetry-node)
10+
[![npm dm](https://img.shields.io/npm/dm/@sentry/opentelemetry-node.svg)](https://www.npmjs.com/package/@sentry/opentelemetry-node)
11+
[![npm dt](https://img.shields.io/npm/dt/@sentry/opentelemetry-node.svg)](https://www.npmjs.com/package/@sentry/opentelemetry-node)
12+
13+
## Links
14+
15+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
16+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
17+
18+
## Usage
19+
20+
TODO
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../jest/jest.config.js');
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "@sentry/opentelemetry-node",
3+
"version": "7.16.0",
4+
"description": "Official Sentry SDK for OpenTelemetry Node.js",
5+
"private": true,
6+
"repository": "git://github.com/getsentry/sentry-javascript.git",
7+
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/opentelemetry-node",
8+
"author": "Sentry",
9+
"license": "MIT",
10+
"engines": {
11+
"node": ">=8"
12+
},
13+
"main": "build/cjs/index.js",
14+
"module": "build/esm/index.js",
15+
"types": "build/types/index.d.ts",
16+
"publishConfig": {
17+
"access": "public"
18+
},
19+
"dependencies": {
20+
"@sentry/core": "7.16.0",
21+
"@sentry/types": "7.16.0",
22+
"@sentry/utils": "7.16.0"
23+
},
24+
"devDependencies": {},
25+
"scripts": {
26+
"build": "run-p build:rollup build:types",
27+
"build:dev": "run-s build",
28+
"build:rollup": "rollup -c rollup.npm.config.js",
29+
"build:types": "tsc -p tsconfig.types.json",
30+
"build:watch": "run-p build:rollup:watch build:types:watch",
31+
"build:dev:watch": "run-s build:watch",
32+
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
33+
"build:types:watch": "tsc -p tsconfig.types.json --watch",
34+
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
35+
"circularDepCheck": "madge --circular src/index.ts",
36+
"clean": "rimraf build coverage sentry-node-*.tgz",
37+
"fix": "run-s fix:eslint fix:prettier",
38+
"fix:eslint": "eslint . --format stylish --fix",
39+
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
40+
"lint": "run-s lint:prettier lint:eslint",
41+
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
42+
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",
43+
"test": "run-s test:jest",
44+
"test:jest": "jest",
45+
"test:watch": "jest --watch"
46+
},
47+
"volta": {
48+
"extends": "../../package.json"
49+
}
50+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index.js';
2+
3+
export default makeNPMConfigVariants(makeBaseNPMConfig());
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Test function
3+
*/
4+
export function test(): void {
5+
// no-op
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { test } from '../src';
2+
3+
describe('index', () => {
4+
it('runs', () => {
5+
test();
6+
});
7+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
4+
"include": ["src/**/*"],
5+
6+
"compilerOptions": {
7+
// package-specific options
8+
}
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
4+
"include": ["test/**/*"],
5+
6+
"compilerOptions": {
7+
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8+
"types": ["node", "jest"]
9+
10+
// other package-specific, test-specific options
11+
}
12+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
4+
"compilerOptions": {
5+
"declaration": true,
6+
"declarationMap": true,
7+
"emitDeclarationOnly": true,
8+
"outDir": "build/types"
9+
}
10+
}

packages/opentelemetry-node/yarn.lock

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@sentry/core@7.16.0":
6+
version "7.16.0"
7+
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.16.0.tgz#60f9b54ef2ec524176b329e1d15be39c36da5953"
8+
integrity sha512-vq6H1b/IPTvzDD9coQ3wIudvSjkAYuUlXb1dv69dRlq4v3st9dcKBps1Zf0lQ1i4TVlDLoe1iGMmNFglMF1Q5w==
9+
dependencies:
10+
"@sentry/types" "7.16.0"
11+
"@sentry/utils" "7.16.0"
12+
tslib "^1.9.3"
13+
14+
"@sentry/types@7.16.0":
15+
version "7.16.0"
16+
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.16.0.tgz#79c06ada153a84feb949fa49b1c9d15f91decd79"
17+
integrity sha512-i6D+OK6d0l/k+VQvRp/Pt21WkDEgVBUIZq+sOkEZJczbcfexVdXKeXXoYTD2vYuFq8Yy28fzlsZaKI+NoH94yQ==
18+
19+
"@sentry/utils@7.16.0":
20+
version "7.16.0"
21+
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.16.0.tgz#b832520c661d4435808969ee04814ff8e20497b1"
22+
integrity sha512-3Zh1txg7IRp4kZAdG27YF7K6lD1IZyuAo9KjoPg1Xzqa4DOZyASJuEkbf+rK2a9T4HrtVHHXJUsNbKg8WM3VHg==
23+
dependencies:
24+
"@sentry/types" "7.16.0"
25+
tslib "^1.9.3"
26+
27+
tslib@^1.9.3:
28+
version "1.14.1"
29+
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
30+
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

0 commit comments

Comments
 (0)