Skip to content

HTTP instrumentation incompatible with http gem v6.0 #613

@timrossinfo

Description

@timrossinfo

The HTTP client instrumentation in ScoutApm::Instruments::HTTP is incompatible with http gem v6.0+, which changed HTTP::Client#request from positional arguments to keyword arguments.

Error

ArgumentError: wrong number of arguments (given 3, expected 2)

Root Cause

Both the prepend and alias instrumentation paths in lib/scout_apm/instruments/http.rb pass opts as a third positional argument to HTTP::Client#request. In http v5, the method accepted (verb, uri, opts = {}). In v6, the signature changed to (verb, uri, **opts) - keyword arguments only - so the third positional argument raises an ArgumentError.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions