Skip to content
Closed
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
5 changes: 3 additions & 2 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Enable Corepack
run: corepack enable
- name: Install root dependencies
run: yarn
run: yarn install --immutable
- name: Build
run: yarn ci:build
- name: Run lint + type check
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
13 changes: 11 additions & 2 deletions examples/hello-node-express-ts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ COPY . .
# example app listens on port 3000
EXPOSE 3000

# symlink hyperdx sdk dependency
RUN cd ./examples/hello-node-express-ts/ && npm run setup && npm run build
# Enable corepack for yarn v4 support
RUN corepack enable

# Install root dependencies first (required for yarn v4 workspaces)
RUN yarn install

# Build only the required package (use yarn run to access binaries from root)
RUN cd ./packages/node-opentelemetry && yarn run build

# Setup example app dependencies and build
RUN cd ./packages/node-opentelemetry && yarn link && cd ../../examples/hello-node-express-ts && yarn install && yarn link @hyperdx/node-opentelemetry && yarn run build

# run example express app
CMD [ "node", "-r", "./examples/hello-node-express-ts/dist/instrumentation.js", "./examples/hello-node-express-ts/dist/index.js" ]
13 changes: 11 additions & 2 deletions examples/hello-node-express/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ COPY . .
# example app listens on port 3000
EXPOSE 3000

# symlink hyperdx sdk dependency
RUN cd ./examples/hello-node-express/ && npm run setup
# Enable corepack for yarn v4 support
RUN corepack enable

# Install root dependencies first (required for yarn v4 workspaces)
RUN yarn install

# Build only the required package (use yarn run to access binaries from root)
RUN cd ./packages/node-opentelemetry && yarn run build

# Setup example app dependencies
RUN cd ./packages/node-opentelemetry && yarn link && cd ../../examples/hello-node-express && yarn install && yarn link @hyperdx/node-opentelemetry

# run example express app
CMD [ "node", "./examples/hello-node-express/index.js" ]
15 changes: 12 additions & 3 deletions examples/hello-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,17 @@ COPY . .

EXPOSE 3000

# symlink hyperdx sdk dependency
RUN cd ./examples/hello-node/ && npm run setup
# Enable corepack for yarn v4 support
RUN corepack enable

# Install root dependencies first (required for yarn v4 workspaces)
RUN yarn install

# Build only the required package (use yarn run to access binaries from root)
RUN cd ./packages/node-opentelemetry && yarn run build

# Setup example app dependencies
RUN cd ./packages/node-opentelemetry && yarn link && cd ../../examples/hello-node && yarn install && yarn link @hyperdx/node-opentelemetry

# run example script from root package.json
CMD [ "npm", "run", "example-node" ]
CMD [ "yarn", "run", "example-node" ]
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@
"prepare": "husky install"
},
"lint-staged": {
"**/*.{ts,tsx}": [
"packages/{instrumentation-*,node-*,browser,cli}/**/*.{ts,tsx}": [
"prettier --write --ignore-unknown",
"eslint --fix"
],
"packages/{otel-web,session-recorder,deno}/**/*.{ts,tsx}": [
"prettier --write --ignore-unknown"
],
"**/*.{json,yml}": [
"prettier --write --ignore-unknown"
]
Expand Down Expand Up @@ -51,5 +54,5 @@
"tsutils": "^3.21.0",
"typescript": "^5.1.3"
},
"packageManager": "yarn@1.22.22"
"packageManager": "yarn@4.10.3"
}
2 changes: 1 addition & 1 deletion packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"postbuild": "mv build/src/index.d.ts build/index.d.ts",
"build:watch": "rollup --config rollup.config.ts --configPlugin typescript -w",
"lint": "eslint . --ext .ts --ext .mts",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:lint": "yarn lint && tsc --noEmit",
"ci:unit": "jest --coverage --ci",
"prettier": "prettier --config .prettierrc --write .",
"test:watch": "jest --watch"
Expand Down
2 changes: 1 addition & 1 deletion packages/instrumentation-exception/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build:types": "tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly",
"build:watch": "tsc -w -p tsconfig.json",
"lint": "eslint . --ext .ts --ext .mts",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:lint": "yarn lint && tsc --noEmit",
"prettier": "prettier --config .prettierrc --write .",
"test": "jest",
"test:watch": "jest --watch"
Expand Down
2 changes: 1 addition & 1 deletion packages/instrumentation-sentry-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build:types": "tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly",
"build:watch": "tsc -w -p tsconfig.json",
"lint": "eslint . --ext .ts --ext .mts",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:lint": "yarn lint && tsc --noEmit",
"prettier": "prettier --config .prettierrc --write ."
},
"dependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/node-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"build:types": "tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly",
"build:watch": "tsc -w -p tsconfig.json",
"lint": "eslint . --ext .ts --ext .mts",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:lint": "yarn lint && tsc --noEmit",
"dev:unit": "jest --watch",
"prettier": "prettier --config .prettierrc --write ."
},
Expand All @@ -52,7 +52,6 @@
"devDependencies": {
"@types/lodash.isstring": "^4.0.9"
},
"peerDependencies": {},
"keywords": [
"winston",
"transport",
Expand Down
2 changes: 1 addition & 1 deletion packages/node-opentelemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build:types": "tsc -d -p tsconfig.release.json --declarationMap --emitDeclarationOnly",
"build:watch": "tsc -w -p tsconfig.json",
"lint": "eslint . --ext .ts --ext .mts",
"ci:lint": "yarn lint && yarn tsc --noEmit",
"ci:lint": "yarn lint && tsc --noEmit",
"dev:unit": "jest --watchAll",
"ci:unit": "jest --coverage --ci",
"prettier": "prettier --config .prettierrc --write ."
Expand Down
9 changes: 5 additions & 4 deletions packages/otel-web/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export default [
},
plugins: [
json(),
nodeResolvePlugin,
typescript({ tsconfig: './tsconfig.base.json' }),
commonjs({
include: /node_modules/,
include: [/node_modules/, /instrumentation-exception/],
sourceMap: true,
transformMixedEsModules: true,
}),
// nodeResolvePlugin,
babelPlugin,
terser({ output: { comments: false } }),
],
Expand All @@ -41,8 +41,9 @@ export default [
},
plugins: [
json(),
nodeResolvePlugin,
commonjs({
include: /node_modules/,
include: [/node_modules/, /instrumentation-exception/],
sourceMap: true,
transformMixedEsModules: true,
}),
Expand Down Expand Up @@ -74,7 +75,7 @@ export default [
json(),
nodeResolvePlugin,
commonjs({
include: /node_modules/,
include: [/node_modules/, /instrumentation-exception/],
sourceMap: true,
transformMixedEsModules: true,
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/otel-web/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export const Rum: RumOtelWebType = {
disable,
);
if (pluginConf) {
// @ts-expect-error Can't mark in any way that processedOptions.instrumentations[confKey] is of specifc config type
// @ts-ignore Can't mark in any way that processedOptions.instrumentations[confKey] is of specifc config type
const instrumentation = new Instrument(pluginConf);
if (
confKey === ERROR_INSTRUMENTATION_NAME &&
Expand Down
Loading
Loading