Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enikey87/otel-node-instrumentation-undici-reproduction
Minimal reproduction of missing spans from instrumentation-undici used with auto-instrumentations-node
https://github.com/enikey87/otel-node-instrumentation-undici-reproduction
Last synced: 7 days ago
JSON representation
Minimal reproduction of missing spans from instrumentation-undici used with auto-instrumentations-node
- Host: GitHub
- URL: https://github.com/enikey87/otel-node-instrumentation-undici-reproduction
- Owner: enikey87
- License: mit
- Created: 2024-08-21T02:15:05.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T03:26:29.000Z (3 months ago)
- Last Synced: 2024-08-21T04:22:53.852Z (3 months ago)
- Language: JavaScript
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Bug
Minimal reproduction and workaround for https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2391.
When using [instrumentation-undici](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-undici)
with `{ enabled: true }`, like in `getNodeAutoInstrumentations({'@opentelemetry/instrumentation-undici': { enabled: true } })`,
the undici instrumentation isn't applied.## Reproduction Steps
1. run `npm install`
2. run `npm run start:issue` to observe `fetch` call span NOT being printed to console
3. run `npm run start:fixed` to observe `fetch` call span being printed to console## Reason
No UndiciInstrumentation is applied because it [uses config.enabled](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/8b35f786158767967597cfc70e053dac4abd72ab/plugins/node/instrumentation-undici/src/undici.ts#L91)
for both its internal state and the configuration itself.