Skip to content

Commit

Permalink
feat(opentelemetry-instrumentation-http, opentelemetry-instrumentatio…
Browse files Browse the repository at this point in the history
…n-grpc): generate esm build files too
  • Loading branch information
serkan-ozal committed Jan 19, 2025
1 parent fc0edd8 commit 077947d
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ For semantic convention package changes, see the [semconv CHANGELOG](packages/se

### :rocket: (Enhancement)

* feat(opentelemetry-instrumentation-http, opentelemetry-instrumentation-grpc): generate esm build files too [5351](https://github.com/open-telemetry/opentelemetry-js/pull/5351) @serkan-ozal

### :bug: (Bug Fix)

* fix(sdk-metrics): do not export from `PeriodicExportingMetricReader` when there are no metrics to export. [#5288](https://github.com/open-telemetry/opentelemetry-js/pull/5288) @jacksonweber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `@grpc/grpc-js` rpc client and server for gRPC framework",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"test": "npm run protos:generate && nyc mocha test/**/*.test.ts",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"peer-api-check": "node ../../../scripts/peer-api-check.js",
Expand All @@ -35,6 +36,9 @@
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": "../../../tsconfig.base.esm.json",
"compilerOptions": {
"outDir": "build/esm",
"rootDir": "src",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../opentelemetry-instrumentation"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"outDir": "build/esnext",
"rootDir": "src",
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../opentelemetry-instrumentation"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
"version": "0.57.0",
"description": "OpenTelemetry instrumentation for `node:http` and `node:https` http client and server modules",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"test:cjs": "nyc mocha test/**/*.test.ts",
"test:esm": "nyc node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ../../../node_modules/mocha/bin/mocha 'test/**/*.test.mjs'",
"test": "npm run test:cjs && npm run test:esm",
"tdd": "npm run test -- --watch-extensions ts --watch",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../../scripts/version-update.js",
"watch": "tsc --build --watch",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies",
"prewatch": "node ../../../scripts/version-update.js",
"peer-api-check": "node ../../../scripts/peer-api-check.js",
Expand All @@ -37,6 +38,9 @@
"node": ">=18"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extends": "../../../tsconfig.base.esm.json",
"compilerOptions": {
"outDir": "build/esm",
"rootDir": "src",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
},
{
"path": "../../../packages/sdk-metrics"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../opentelemetry-instrumentation"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"extends": "../../../tsconfig.base.esnext.json",
"compilerOptions": {
"outDir": "build/esnext",
"rootDir": "src",
"tsBuildInfoFile": "build/esnext/tsconfig.esnext.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
"references": [
{
"path": "../../../api"
},
{
"path": "../../../packages/opentelemetry-context-async-hooks"
},
{
"path": "../../../packages/opentelemetry-core"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-base"
},
{
"path": "../../../packages/opentelemetry-sdk-trace-node"
},
{
"path": "../../../packages/sdk-metrics"
},
{
"path": "../../../semantic-conventions"
},
{
"path": "../opentelemetry-instrumentation"
}
]
}
6 changes: 6 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
{
"path": "experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.esm.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-grpc/tsconfig.esm.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-http/tsconfig.esm.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esm.json"
},
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.esnext.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
{
"path": "experimental/packages/opentelemetry-instrumentation-fetch/tsconfig.esnext.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-grpc/tsconfig.esnext.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-http/tsconfig.esnext.json"
},
{
"path": "experimental/packages/opentelemetry-instrumentation-xml-http-request/tsconfig.esnext.json"
},
Expand Down

0 comments on commit 077947d

Please sign in to comment.