Skip to content

ARSN-688: Keep the wrapped handler name in instrumentApiMethod - #2761

Merged
bert-e merged 2 commits into
development/8.6from
improvement/ARSN-688/keep-handler-names
Nov 26, 2026
Merged

bert-e merged 2 commits into
development/8.6from
improvement/ARSN-688/keep-handler-names

Conversation

@delthas

@delthas delthas commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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 name property of the returned function was wrong.

It was the actual route name before, and overwritten to instrumented here 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 promisify does. No bad side effects found.

Issue: ARSN-688

With tracing on, the wrapper was named `instrumented`, while with
tracing off the handler itself is returned: callers reading the
handler's name, like cloudserver's backbeat access logs, saw it change
when tracing was turned on.

Issue: ARSN-688
@bert-e

bert-e commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@scality scality deleted a comment from bert-e Nov 25, 2026
@bert-e

bert-e commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.78%. Comparing base (307a968) to head (930d8b6).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@delthas
delthas marked this pull request as ready for review November 25, 2026 18:33
@delthas
delthas requested review from a team, DarkIsDude and SylvainSenechal November 25, 2026 18:33

@DarkIsDude DarkIsDude left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it was needed to fix ? How did we detect that ?

@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

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)

@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

!done 2h

@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

!release

@scality scality deleted a comment from bert-e Nov 26, 2026
@bert-e

bert-e commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/8.6

  • ✔️ development/8.7

The following branches have NOT changed:

  • development/6.4
  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.1
  • development/8.2
  • development/8.3
  • development/8.4
  • development/8.5

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/7.10.31
  • hotfix/7.9.0
  • hotfix/7.5.0
  • hotfix/7.10.1
  • hotfix/7.10.57
  • hotfix/6.4.7
  • hotfix/7.4.0
  • hotfix/7.4.10
  • hotfix/7.8.0
  • hotfix/7.10.29
  • hotfix/7.4.7
  • hotfix/8.2.39
  • hotfix/7.4.8
  • hotfix/7.4.9
  • hotfix/7.6.0
  • hotfix/7.10.2
  • hotfix/7.4.2
  • hotfix/8.2.48
  • hotfix/7.2.0
  • hotfix/7.10.4
  • hotfix/7.70.20
  • hotfix/7.4.4
  • hotfix/7.70.25
  • hotfix/7.4.1
  • hotfix/7.7.0
  • hotfix/7.10.43
  • hotfix/7.10.46
  • hotfix/7.10.36
  • hotfix/8.2.50
  • hotfix/7.70.4
  • hotfix/7.4.6
  • hotfix/7.10.0
  • hotfix/7.10.3
  • hotfix/7.4.5
  • hotfix/7.70.14
  • hotfix/7.10.47
  • hotfix/7.4.3

Please check the status of the associated issue ARSN-688.

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 930d8b6 into development/8.6 Nov 26, 2026
14 checks passed
@bert-e
bert-e deleted the improvement/ARSN-688/keep-handler-names branch November 26, 2026 11:03
@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Release summary:

  • development/8.6: releasing 8.6.6
  • development/8.7: releasing 8.7.3

@delthas

delthas commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

ARSN-688: logged 2h; transitioned to Done (Fixed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants