Node route harvesting - #924
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #924 +/- ##
==========================================
+ Coverage 55.09% 55.78% +0.68%
==========================================
Files 253 254 +1
Lines 21756 22085 +329
==========================================
+ Hits 11987 12320 +333
+ Misses 8945 8928 -17
- Partials 824 837 +13
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:
|
NimrodAvni78
left a comment
There was a problem hiding this comment.
Super great feature!
| @@ -58,10 +56,10 @@ func (e *HarvestError) Error() string { | |||
| func NewRouteHarvester(cfg *services.RouteHarvestingConfig, disabled []string, timeout time.Duration) *RouteHarvester { | |||
There was a problem hiding this comment.
@grcevski so the config is still a string[] but we compare it to the string enum?
maybe we can create MarshalText and UnmarshalText on InstrumentableType to allow users to specify it and have config type safety?
There was a problem hiding this comment.
Good idea! I will follow-up with a PR to fix this, either standalone or when I add ruby.
NimrodAvni78
left a comment
There was a problem hiding this comment.
small nit regarding the config, besides that LGTM
This PR extends our route harvesting capabilities to Node.js as well as the existing ones for Java and Go. Since Node.js applications are deployed as scripts, the code does a directory scan for a few of the most common Node.js web framewrorks and discovers routes used.
Supported frameworks:
The majority of the code are tests. Main logic of the harvesting is in
js.go, with some extra helper libraries that help us determine what's the path for the main node.js script.