Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
43fd59e
docs: add example for esm-http-ts
JamieDanielson Mar 21, 2023
e5215fe
fix: use instr version not node version
JamieDanielson Mar 21, 2023
3c51c6d
deps: add import-in-the-middle
JamieDanielson Mar 21, 2023
8444af3
feat: add iitm for esm instr
JamieDanielson Mar 21, 2023
e4478d9
docs: add readme notes from valentin
JamieDanielson Mar 21, 2023
1434b27
wip: add test based on valentin's test
JamieDanielson Mar 21, 2023
a533f9f
remove changes to ritm init
JamieDanielson Mar 22, 2023
a43089b
update example - use build dir, add readme
JamieDanielson Mar 22, 2023
85a2e8f
add changelog entry
JamieDanielson Mar 22, 2023
e0b5c44
dont use ritm singleton for iitm
JamieDanielson Mar 23, 2023
63477c5
fix up call for new iitm
JamieDanielson Mar 23, 2023
1188c02
Merge branch 'main' into esm-support
JamieDanielson Mar 23, 2023
33e544c
Merge branch 'main' into esm-support
lizthegrey Mar 28, 2023
bfe51f5
wrap function refactor
pkanal Mar 31, 2023
7110c37
clean up
pkanal Apr 3, 2023
3ddb3a9
Merge pull request #1 from honeycombio/purvi/esm-tests
JamieDanielson Apr 4, 2023
3f3d9a2
Merge branch 'main' into esm-support
JamieDanielson Apr 4, 2023
2936a16
update changelog: it takes a village
JamieDanielson Apr 4, 2023
4a10129
small cleanup on test
JamieDanielson Apr 4, 2023
50363c5
version should be node version, not instr version
JamieDanielson Apr 5, 2023
c9922c3
run lint:fix for prettier error
JamieDanielson Apr 5, 2023
b722486
Merge pull request #2 from honeycombio/jamie.http-node-version
pkanal Apr 5, 2023
4ac1ee1
base unwrap functionality
pkanal Apr 5, 2023
a346531
move esm specific wrap logic to node class
pkanal Apr 5, 2023
1ca6b55
fix types
pkanal Apr 6, 2023
4401576
add masswrap & massunwrap
pkanal Apr 6, 2023
86b6837
handle edge cases for masswrap and massunwrap
pkanal Apr 6, 2023
da694c7
Merge pull request #3 from honeycombio/purvi.unwrap
JamieDanielson Apr 7, 2023
1612855
Merge branch 'main' into esm-support
JamieDanielson Apr 7, 2023
e924c99
Ship shimmer types (#5)
pkanal Apr 25, 2023
b894bcd
Merge branch 'main' into esm-support
pkanal Apr 25, 2023
68c43c9
use --experimental-meta-resolve option with hook file (#8)
pkanal Apr 26, 2023
a2a74f8
Merge branch 'main' into esm-support
pkanal May 1, 2023
a529c8c
fix markdown
pkanal May 1, 2023
ddc8dc5
Merge branch 'main' into esm-support
pkanal May 3, 2023
42eb5ba
address PR feedback (#9)
pkanal May 3, 2023
4f71df8
Update experimental/packages/opentelemetry-instrumentation/hook.js
pkanal May 5, 2023
6a052b1
Update experimental/packages/opentelemetry-instrumentation/hook.mjs
pkanal May 5, 2023
58d34c0
change back to process.versions.node (#10)
pkanal May 5, 2023
33409da
address pr feedback (#11)
pkanal May 9, 2023
1f017b0
remove `--experimental-import-meta-resolve` flag (#12)
pkanal May 10, 2023
16109d3
Merge branch 'main' into esm-support
JamieDanielson May 10, 2023
bcaef1c
Merge branch 'main' into esm-support
JamieDanielson May 11, 2023
c590efc
Merge branch 'main' into esm-support
JamieDanielson May 12, 2023
59047bd
remove import limitation from README
pkanal May 12, 2023
0167a10
add esm example to examples readme
pkanal May 12, 2023
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
Prev Previous commit
Next Next commit
Merge branch 'main' into esm-support
  • Loading branch information
JamieDanielson authored May 11, 2023
commit bcaef1c4747318ea8b74cad910442748fa583292
13 changes: 12 additions & 1 deletion experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ All notable changes to experimental packages in this project will be documented

### :rocket: (Enhancement)

* feat(instrumentation): add ESM support for instrumentation [#3698](https://github.com/open-telemetry/opentelemetry-js/pull/3698) @JamieDanielson, @pkanal, @vmarchaud, @lizthegrey, @bengl
* feat(instrumentation): add ESM support for instrumentation. [#3698](https://github.com/open-telemetry/opentelemetry-js/pull/3698) @JamieDanielson, @pkanal, @vmarchaud, @lizthegrey, @bengl

### :bug: (Bug Fix)

### :books: (Refine Doc)

### :house: (Internal)

## 0.39.0

### :rocket: (Enhancement)

* feat(otlp-transformer): support log records. [#3712](https://github.com/open-telemetry/opentelemetry-js/pull/3712/) @llc1123
* feat(otlp-grpc-exporter-base): support log records. [#3712](https://github.com/open-telemetry/opentelemetry-js/pull/3712/) @llc1123
* feat(exporter-logs-otlp-grpc): otlp-grpc exporter for logs. [#3712](https://github.com/open-telemetry/opentelemetry-js/pull/3712/) @llc1123
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ As the ESM module loader from NodeJS is experimental, so is our support for it.

**Note**: ESM Instrumentation is not yet supported for Node 20.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the limitations section below which tells ECMA script modules (using import) is not supported as of now.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this mean? How can one use ESM without import?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means that the limitations section requires changes in this PR because it removes one of them.
Before this PR ESM/import was not supported and only CJS/require worked.
Th limitation with bundlers stays.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, super, thanks for the clarification :) a panic mode was already about to arise :D

## Limitations

Instrumentations for external modules (e.g. express, mongodb,...) hooks the `require` call. Therefore following conditions need to be met that this mechanism can work:

* `require` is used. ECMA script modules (using `import`) is not supported as of now
* Instrumentations are registered **before** the module to instrument is `require`ed
* modules are not included in a bundle. Tools like `esbuild`, `webpack`, ... usually have some mechanism to exclude specific modules from bundling

## License

Apache 2.0 - See [LICENSE][license-url] for more information.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.