Repository navigation
ARSN-688: Keep the wrapped handler name in instrumentApiMethod - #2761
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development/8.6 #2761 +/- ##
================================================
Coverage 75.77% 75.78%
================================================
Files 226 226
Lines 18530 18532 +2
Branches 3785 3820 +35
================================================
+ Hits 14042 14044 +2
Misses 4483 4483
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
DarkIsDude
left a comment
There was a problem hiding this comment.
Why it was needed to fix ? How did we detect that ?
Cloudserver sets the access log "analytics action" for backbeat routes from the handler name, which we would have broken otherwise when instrumenting backbeat routes in scality/cloudserver#6398 https://github.com/scality/cloudserver/blob/development/9.6/lib/routes/routeBackbeat.js#L2006 (But the fix is good to have in any case) |
|
/approve |
|
!done 2h |
|
!release |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue ARSN-688. Goodbye delthas. The following options are set: approve |
|
|
Hand-written description ✍️
For OpenTelemetry we wrap routes to instrument them.
In order for this to be fully transparent to callers though we should ensure that the wrapped function looks identical to the unwrapped version.
There was one issue, which this PR fixes: the
nameproperty of the returned function was wrong.It was the actual route name before, and overwritten to
instrumentedhere always because that was the name of the variable.So the fix is just to re-apply the property properly. That's actually exactly what node
promisifydoes. No bad side effects found.Issue: ARSN-688