-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: make dns and fs optional instrumentation #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
saidsef
commented
Apr 4, 2025
- chore: make dns and fs optional instrumentation
/code pr |
b22d0b0
to
6ed461d
Compare
6ed461d
to
c865083
Compare
Application tracing-node-c865083-281-pr-reviews is in state Running. |
Application tracing-node-c865083-281-pr-reviews has been created. |
Application tracing-node-c865083-281-pr-reviews is in state Succeeded. |
/code pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖
The PR looks good, making FS and DNS instrumentation optional with new boolean flags that default to false
. This improves the library by giving users more control over which instrumentations are enabled, which can help reduce overhead when these features aren't needed.
A few observations:
-
The code changes in
libs/index.mjs
are well implemented with:- Clear parameter documentation in JSDoc comments
- Conditional instrumentation loading with explanatory comments
- Reorganized instrumentation list to make the optional components clearer
-
The README updates appropriately document the new parameters.
-
The version bump from 3.4.5 to 3.4.6 is appropriate for this minor feature enhancement.
This change provides a good balance between functionality and performance, allowing users to opt-in to potentially higher-overhead instrumentations only when needed.
> claude-3-7-sonnet-latest [pr | 1]
/code pr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖
Code Review Summary
Changes Overview
- Made FS and DNS instrumentation optional with new boolean config options
- Updated version from 3.4.5 to 3.4.6
- Updated git revision reference in deployment file
Per-File Analysis
README.md
- Added documentation for two new configuration options:
enableFsInstrumentation
andenableDnsInstrumentation
, both defaulting to false.
deployment/base/job.yml
- Updated the git revision reference from "dependabot-npm_and_yarn-opentelemetry-instrumentation-aws-sdk-0.50.0" to "optional-dns-fs-instrumentation".
libs/index.mjs
- Added optional parameters for enabling FS and DNS instrumentation with clear documentation.
- Refactored instrumentation registration to conditionally include FS and DNS based on the new parameters.
package.json and package-lock.json
- Incremented version from 3.4.5 to 3.4.6.
- Updated caniuse-lite dependency in package-lock.json from 1.0.30001709 to 1.0.30001710.
Issues and Improvements
-
Improvement: The default values for new instrumentation options are explained in comments, but consider adding examples in the README.md for enabling these instrumentations.
-
Style: In libs/index.mjs, move all instrumentations into a single array declaration rather than starting with a base array and then conditionally pushing to it.
-
Performance: Good improvement by making FS and DNS instrumentation optional, as these can create substantial overhead when not needed.
> claude-3-7-sonnet-latest [pr | 0]
Application tracing-node-c865083-281-pr-reviews is now running new version of deployments manifests. |
Application tracing-node-c865083-281-pr-reviews is in state Running. |
Application tracing-node-c865083-281-pr-reviews is in state Succeeded. |
Application tracing-node-c865083-281-pr-reviews is now running new version of deployments manifests. |
Application tracing-node-c865083-281-pr-reviews is in state Running. |
Application tracing-node-c865083-281-pr-reviews is in state Succeeded. |
Application tracing-node-c865083-281-pr-reviews has been deleted. |