You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour
Options keyword arguments are not being respected when trying to integrate and modify Net/HTTP and Faraday instrumentation.
When attempting to supply a range of error_status_codes into Datadog.configure_onto(client, **options) via a block the range is not being applied, all error_status_codes are still traced as errors which is the default behaviour. This is the same for other options keywords as well.
For error_status_codes specifically, we believe the issue is here:
Hey @clarkey022, have you tried using configuring the Datadog middleware in the builder object, instead of the adapter, like so:
Faraday.new do |builder|
builder.use(:datadog_tracing, error_status_codes: 400..403)
block&.call(builder)
end
Notice that there's a small change here too: error_status_codes: [400..403] became error_status_codes: 400..403. This is because we don't have the full configuration parser in the middleware options (like we have the global configuration), so the option must respond to include?.
Current behaviour
Options keyword arguments are not being respected when trying to integrate and modify Net/HTTP and Faraday instrumentation.
When attempting to supply a range of
error_status_codes
intoDatadog.configure_onto(client, **options)
via a block the range is not being applied, all error_status_codes are still traced as errors which is the default behaviour. This is the same for other options keywords as well.For error_status_codes specifically, we believe the issue is here:
dd-trace-rb/lib/datadog/tracing/contrib/http/instrumentation.rb
Line 105 in c5232cb
For some reason request[:options] does not contain the error codes/ranges we provide.
Expected behaviour
Options keyword arguments to be respected when instrumenting Net/HTTP or Faraday on a per-connection basis as defined in the docs https://docs.datadoghq.com/tracing/trace_collection/automatic_instrumentation/dd_libraries/ruby/#nethttp
Steps to reproduce
Attempt to define a Faraday connection through a build method like below:
When the build method is called, pass in a block like below:
Note options keyword arguments aren't applied to the http connection.
How does
datadog
help you?Environment
Datadog.configure ...
): **Linux
The text was updated successfully, but these errors were encountered: