It seems to be based on OpenTelemetry and currently supports Python and Node.js runtimes, but does it also work with Node.js functions using ECMAScript modules (ESM)? — the documentation doesn't tell 🤔 — Niko Virtala at Bluesky
From the function logs we can see how the module is loaded — please note .mjs
(Module JavaScript):
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("%40opentelemetry/instrumentation/hook.mjs", pathToFileURL("./"));'
The answer is yes — it works with Node.js functions using ES modules!