-
Notifications
You must be signed in to change notification settings - Fork 533
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
feat: net module instrumentation #389
Conversation
Codecov Report
@@ Coverage Diff @@
## main #389 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 10 10
Lines 407 407
Branches 44 44
=======================================
Hits 384 384
Misses 23 23 |
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.
overall looks good, few nitpicks
plugins/node/opentelemetry-instrumentation-net/test/instrument.test.ts
Outdated
Show resolved
Hide resolved
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.
Looks really good; one small question about error handling which I don't consider a blocker.
plugins/node/opentelemetry-instrumentation-net/test/instrument.test.ts
Outdated
Show resolved
Hide resolved
plugins/node/opentelemetry-instrumentation-net/test/connect.test.ts
Outdated
Show resolved
Hide resolved
thx for all changes, I'm missing two final things:
Extra: |
btw I tried to assign you the issue you worked on but it seems you have to comment on that before I can do it |
Added a LICENSE and README.md (along with references to the package even though it is not published yet). For an example how this looks like in Zipkin when using an express application which is doing an outbound request: Do note that the |
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.
thx a lot for your contribution, this looks great!
This looks great, would you be open to accept a contribute to also add a span for the |
@johanneswuerbach shouldn't this be handled by the dns instrumentation ? |
Which problem is this PR solving?
net module instrumentation (fixes #291)
Short description of the changes
Socket.connect
(thus also providing instrumentation fornet.connect
andnet.createConnection
)timeout
event is not handled on purpose as this event is not related toconnect
. Whenconnect
fails with a timeout, it will emit an error instead (e.g.EATIMEOUT
).