Skip to content

Fix HTTP instrumentation for http gem v6.0+#614

Open
lancetarn wants to merge 2 commits intomasterfrom
613-http-instrumentation-incompatible-with-http-gem-v60
Open

Fix HTTP instrumentation for http gem v6.0+#614
lancetarn wants to merge 2 commits intomasterfrom
613-http-instrumentation-incompatible-with-http-gem-v60

Conversation

@lancetarn
Copy link
Copy Markdown
Contributor

@lancetarn lancetarn commented Mar 26, 2026

Summary

  • Fixes HTTP instrumentation incompatible with http gem v6.0 #613ArgumentError: wrong number of arguments (given 3, expected 2) when using http gem v6.0+
  • http gem v6.0 changed HTTP::Client#request from positional args (verb, uri, opts = {}) to keyword args (verb, uri, **opts)
  • Adds version detection via Gem::Version and separate instrumentation paths for v5 (positional) and v6+ (keyword) in both the prepend and alias code paths

Test plan

  • Existing HTTP instrumentation test updated and passes with http gem v6.0.2
  • Full test suite (284 tests) passes with no regressions
  • Verify with http gem v5.x to confirm backwards compatibility

🤖 Generated with Claude Code

…ation

http gem v6.0 changed HTTP::Client#request from positional args (verb, uri, opts = {})
to keyword args (verb, uri, **opts). Add version detection and separate instrumentation
paths for v5 (positional) and v6+ (keyword) to maintain backwards compatibility.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@lancetarn lancetarn linked an issue Mar 26, 2026 that may be closed by this pull request
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.

HTTP instrumentation incompatible with http gem v6.0

2 participants