Skip to content
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

Rename instruments to instrumentation #2145

Merged
merged 2 commits into from
Mar 6, 2025
Merged

Rename instruments to instrumentation #2145

merged 2 commits into from
Mar 6, 2025

Conversation

ardatan
Copy link
Owner

@ardatan ardatan commented Mar 6, 2025

Verified

This commit was signed with the committer’s verified signature.
toitzi Tobias Oitzinger
Copy link

coderabbitai bot commented Mar 6, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated package dependencies to use the new instrumentation package for enhanced consistency.
  • Documentation
    • Revised usage examples and documentation to reflect the updated "Instrumentation" naming.
  • Refactor
    • Standardized naming across the public API and internal references to improve clarity and streamline configuration.

Walkthrough

This pull request performs a refactoring by renaming and updating dependency references from @envelop/instruments to @envelop/instrumentation within the @whatwg-node/server package. Changes span dependency updates, codebase renaming for imports, exports, variables, types, and documentation updates in the changelog to reflect the new naming convention.

Changes

File(s) Change Summary
.changeset/@whatwg-node_server-2145-dependencies.md
packages/server/package.json
Updated dependencies: removed @envelop/instruments@1.0.0 and added @envelop/instrumentation@^1.0.0.
packages/server/CHANGELOG.md Renamed all instances of "Instruments" to "Instrumentation" in documentation and usage examples, including dependency version references.
packages/server/src/createServerAdapter.ts
packages/server/src/index.ts
packages/server/src/plugins/types.ts
packages/server/test/instrumentation.spec.ts
Refactored source code: updated import/export statements, variable names, type definitions, and interface properties from instruments to instrumentation.

Possibly related PRs

Suggested reviewers

  • ardatan
  • dotansimha

Poem

I'm a hopping rabbit in a code-filled glen,
Skipping past bugs now and then.
With instrumentation shining so bright,
My refactored changes bring delight.
Code paths are clear, updates concise—
I celebrate these changes with a nibble of bytes!
🐇💻


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f4ba51 and e996dfe.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • .changeset/@whatwg-node_server-2145-dependencies.md (1 hunks)
  • packages/server/CHANGELOG.md (5 hunks)
  • packages/server/package.json (1 hunks)
  • packages/server/src/createServerAdapter.ts (4 hunks)
  • packages/server/src/index.ts (1 hunks)
  • packages/server/src/plugins/types.ts (2 hunks)
  • packages/server/test/instrumentation.spec.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@benchmarks/node-fetch results (consumeBody)

   ✓ active_handles.................: avg=140.2177 min=12      med=140     max=193     p(90)=161     p(95)=166    
     data_received..................: 19 MB  646 kB/s
     data_sent......................: 12 MB  414 kB/s
     http_req_blocked...............: avg=3.8µs    min=591ns   med=1.35µs  max=8.15ms  p(90)=2.12µs  p(95)=2.41µs 
     http_req_connecting............: avg=1.88µs   min=0s      med=0s      max=8.09ms  p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=23.6ms   min=3.49ms  med=22.83ms max=1.23s   p(90)=29.52ms p(95)=31.25ms
       { expected_response:true }...: avg=23.6ms   min=3.49ms  med=22.83ms max=1.23s   p(90)=29.52ms p(95)=31.25ms
     http_req_failed................: 0.00%  ✓ 0           ✗ 126676
     http_req_receiving.............: avg=34.69µs  min=9.95µs  med=25.82µs max=11.36ms p(90)=39.97µs p(95)=46.17µs
     http_req_sending...............: avg=11.16µs  min=3.55µs  med=6.6µs   max=8.9ms   p(90)=10.25µs p(95)=14.02µs
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=23.55ms  min=3.46ms  med=22.79ms max=1.23s   p(90)=29.47ms p(95)=31.19ms
     http_reqs......................: 126676 4222.057976/s
     iteration_duration.............: avg=47.32ms  min=10.52ms med=45.48ms max=1.25s   p(90)=50.95ms p(95)=58.95ms
     iterations.....................: 63311  2110.129089/s
     vus............................: 1      min=1         max=100 
     vus_max........................: 100    min=100       max=100 

Copy link
Contributor

github-actions bot commented Mar 6, 2025

@benchmarks/node-fetch results (noConsumeBody)

   ✓ active_handles.................: avg=139.842785 min=18       med=141     max=191     p(90)=161     p(95)=165    
     data_received..................: 21 MB  682 kB/s
     data_sent......................: 13 MB  442 kB/s
     http_req_blocked...............: avg=3.59µs     min=651ns    med=1.39µs  max=8.28ms  p(90)=2.07µs  p(95)=2.38µs 
     http_req_connecting............: avg=1.33µs     min=0s       med=0s      max=3.98ms  p(90)=0s      p(95)=0s     
     http_req_duration..............: avg=22.35ms    min=573.1µs  med=21.68ms max=1.18s   p(90)=28.23ms p(95)=30.1ms 
       { expected_response:true }...: avg=22.35ms    min=573.1µs  med=21.68ms max=1.18s   p(90)=28.23ms p(95)=30.1ms 
     http_req_failed................: 0.00%  ✓ 0           ✗ 133749
     http_req_receiving.............: avg=36.33µs    min=9.68µs   med=24.77µs max=26.16ms p(90)=39.58µs p(95)=47.21µs
     http_req_sending...............: avg=12.24µs    min=3.31µs   med=6.69µs  max=13.08ms p(90)=10.36µs p(95)=15.04µs
     http_req_tls_handshaking.......: avg=0s         min=0s       med=0s      max=0s      p(90)=0s      p(95)=0s     
     http_req_waiting...............: avg=22.3ms     min=548.94µs med=21.64ms max=1.18s   p(90)=28.18ms p(95)=30.03ms
     http_reqs......................: 133749 4457.691057/s
     iteration_duration.............: avg=44.82ms    min=4.85ms   med=43.22ms max=1.21s   p(90)=48.81ms p(95)=54.17ms
     iterations.....................: 66864  2228.495577/s
     vus............................: 100    min=100       max=100 
     vus_max........................: 100    min=100       max=100 

@ardatan ardatan merged commit dac036c into master Mar 6, 2025
2 of 3 checks passed
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@benchmarks/server results (native)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 235156      ✗ 0     
     data_received..................: 24 MB   788 kB/s
     data_sent......................: 9.4 MB  314 kB/s
     http_req_blocked...............: avg=1.37µs   min=881ns    med=1.16µs   max=261.71µs p(90)=1.86µs   p(95)=2.02µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=117.29µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=193.42µs min=140.39µs med=183.48µs max=9.84ms   p(90)=210.13µs p(95)=220.16µs
       { expected_response:true }...: avg=193.42µs min=140.39µs med=183.48µs max=9.84ms   p(90)=210.13µs p(95)=220.16µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 117578
     http_req_receiving.............: avg=24.8µs   min=13.75µs  med=23.14µs  max=2.54ms   p(90)=30.35µs  p(95)=33.06µs 
     http_req_sending...............: avg=6.16µs   min=3.94µs   med=5.28µs   max=189.12µs p(90)=8.04µs   p(95)=8.68µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=162.45µs min=116.71µs med=152.17µs max=9.78ms   p(90)=175.91µs p(95)=185.12µs
     http_reqs......................: 117578  3919.103603/s
     iteration_duration.............: avg=250.75µs min=182.87µs med=239.89µs max=9.94ms   p(90)=270.37µs p(95)=283.56µs
     iterations.....................: 117578  3919.103603/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

@ardatan ardatan deleted the rename-instr branch March 6, 2025 15:35
Copy link
Contributor

github-actions bot commented Mar 6, 2025

@benchmarks/server results (ponyfill)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 296058      ✗ 0     
     data_received..................: 29 MB   972 kB/s
     data_sent......................: 12 MB   395 kB/s
     http_req_blocked...............: avg=1.38µs   min=862ns    med=1.18µs   max=176.74µs p(90)=1.87µs   p(95)=2.03µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=111.17µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=140.24µs min=95.72µs  med=135.57µs max=5.74ms   p(90)=157.74µs p(95)=164.94µs
       { expected_response:true }...: avg=140.24µs min=95.72µs  med=135.57µs max=5.74ms   p(90)=157.74µs p(95)=164.94µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 148029
     http_req_receiving.............: avg=24.44µs  min=11.66µs  med=22.92µs  max=2.46ms   p(90)=30.16µs  p(95)=32.84µs 
     http_req_sending...............: avg=6.29µs   min=3.86µs   med=5.42µs   max=2.5ms    p(90)=8.12µs   p(95)=8.82µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=109.5µs  min=68.77µs  med=104.5µs  max=5.66ms   p(90)=123.51µs p(95)=129.26µs
     http_reqs......................: 148029  4934.123845/s
     iteration_duration.............: avg=198.15µs min=143.24µs med=192.71µs max=6.08ms   p(90)=218.37µs p(95)=227.68µs
     iterations.....................: 148029  4934.123845/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

Copy link
Contributor

github-actions bot commented Mar 6, 2025

@benchmarks/server results (undici)

     ✓ no-errors
     ✓ expected-result

   ✓ checks.........................: 100.00% ✓ 216460      ✗ 0     
     data_received..................: 22 MB   725 kB/s
     data_sent......................: 8.7 MB  289 kB/s
     http_req_blocked...............: avg=1.41µs   min=902ns    med=1.19µs   max=160.67µs p(90)=1.89µs   p(95)=2.07µs  
     http_req_connecting............: avg=0ns      min=0s       med=0s       max=101.89µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=214.35µs min=158.43µs med=202.03µs max=55.79ms  p(90)=228.57µs p(95)=238.19µs
       { expected_response:true }...: avg=214.35µs min=158.43µs med=202.03µs max=55.79ms  p(90)=228.57µs p(95)=238.19µs
     http_req_failed................: 0.00%   ✓ 0           ✗ 108230
     http_req_receiving.............: avg=25.6µs   min=13.93µs  med=23.79µs  max=2.67ms   p(90)=31.06µs  p(95)=33.78µs 
     http_req_sending...............: avg=6.39µs   min=4.11µs   med=5.53µs   max=321.49µs p(90)=8.19µs   p(95)=8.96µs  
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=182.36µs min=132.53µs med=170.38µs max=55.67ms  p(90)=193.46µs p(95)=202.44µs
     http_reqs......................: 108230  3607.524319/s
     iteration_duration.............: avg=272.66µs min=202.22µs med=259.36µs max=55.93ms  p(90)=289.67µs p(95)=302.31µs
     iterations.....................: 108230  3607.524319/s
     vus............................: 1       min=1         max=1   
     vus_max........................: 1       min=1         max=1   

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.

None yet

1 participant