-
Notifications
You must be signed in to change notification settings - Fork 129
Improve nodejs asyncID tracking #1800
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
@@ -216,7 +216,7 @@ debug: | |||
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -mod vendor -gcflags "-N -l" -ldflags="-X '$(BUILDINFO_PKG).Version=$(RELEASE_VERSION)' -X '$(BUILDINFO_PKG).Revision=$(RELEASE_REVISION)'" -a -o bin/$(CMD) $(MAIN_GO_FILE) | |||
|
|||
.PHONY: dev | |||
dev: prereqs docker-generate compile-for-coverage | |||
dev: prereqs generate compile-for-coverage |
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.
for development, I think we should just use the local development clang/llvm for speed purposes, rather than having to use the docker generate.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1800 +/- ##
==========================================
- Coverage 67.23% 65.35% -1.89%
==========================================
Files 219 203 -16
Lines 22605 20884 -1721
==========================================
- Hits 15199 13648 -1551
+ Misses 6634 6363 -271
- Partials 772 873 +101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Impressive!
@@ -119,7 +119,7 @@ static __always_inline tp_info_pid_t *find_parent_trace(const pid_connection_inf | |||
} | |||
|
|||
attempts++; | |||
} while (attempts < 3); // Up to 3 levels of thread nesting allowed | |||
} while (attempts < 5); // Up to 5 levels of thread nesting allowed |
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.
if this 5 needs to be in sync with the one in the for inside runtime.h
, perhaps we should use a constant
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.
They are technically different, one is how many times we go up the child->parent chain (this one in runtime) and the other is how many times we decrement the current async_id until we find one matching.
In certain situations, for example, when the await keyword is used in JavaScript, the asyncID may be incremented outside of the NodeJS runtime, e.g. by the interpreted JavaScript code. In this case we'll have gaps in the NodeJS chain of async event parent child relationship. This PR introduces a loop to look for neighbouring child asyncIDs for the request/client call chains for NodeJS, in case we cannot find the parent information directly.
TODO: