You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(node:7368) ExperimentalWarning: '--experimental-loader' may be removed in the future; instead use 'register()':
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("%40opentelemetry/instrumentation/hook.mjs", pathToFileURL("./"));'
(Use node --trace-warnings ... to show where the warning was created)
file:///C:/rec/esm-http-ts/build/index.js:5
import { ConsoleSpanExporter, SimpleSpanProcessor, } from '@opentelemetry/sdk-trace-base';
^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@opentelemetry/sdk-trace-base' does not provide an export named 'ConsoleSpanExporter'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
(node:18688) ExperimentalWarning: --experimental-loader may be removed in the future; instead use register():
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("%40opentelemetry/instrumentation/hook.mjs", pathToFileURL("./"));'
(Use node --trace-warnings ... to show where the warning was created)
file:///C:/rec/esm-http-ts/build/index.js:3
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
^^^^^^^^^^^^^^^^^^^
SyntaxError: The requested module '@opentelemetry/instrumentation-http' does not provide an export named 'HttpInstrumentation'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
> esm-http-ts@0.49.1 start
> node --experimental-loader=@opentelemetry/instrumentation/hook.mjs ./build/index.js
(node:8372) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("%40opentelemetry/instrumentation/hook.mjs", pathToFileURL("./"));'(Use `node --trace-warnings ...` to show where the warning was created)file:///C:/rec/esm-http-ts/build/index.js:3import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'; ^^^^^^^^^^^^^^^^^^^SyntaxError: The requested module '@opentelemetry/instrumentation-http' does not provide an export named 'HttpInstrumentation' at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21) at async ModuleJob.run (node:internal/modules/esm/module_job:214:5) at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) at async loadESM (node:internal/process/esm_loader:28:7) at async handleMainPromise (node:internal/modules/run_main:113:12)Node.js v20.11.1
The text was updated successfully, but these errors were encountered:
@Mahmaddz thanks for reaching out and the detailed report. We currently do not support this version of Node.js with our experimental ESM instrumentation. We also have reported problems with Node.js v18.19+, see #4553
We're planning to update and add support for these versions once #4553 is completed. Closing this as a duplicate for now.
What happened?
Steps to Reproduce
clone and run this official example:
https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/esm-http-ts
or Manually setup this
Expected Result
Log traces
Actual Result
throw error
`
also for HttpInstrumentation:
`
`
Additional Details
OpenTelemetry Setup Code
package.json
Relevant log output
The text was updated successfully, but these errors were encountered: