dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

Enabling `request_queueing` breaks trace ingestion filtration due to dropping `http.url` tag

Open tylerwillingham opened this issue 2 years ago • 2 comments

Current behaviour

When enabling request queuing, the trace root span does not tag the http.url the same way that it does with this option disabled.

For our applications this means that since we opted into the feature our frequent calls to healthcheck endpoints are being ingested again. We currently use the filter_tags option in the APM agent configuration to drop traces. For example:

apm_config:
  # ...
  filter_tags:
    reject:
      - "http.url:/health"
      - "http.url:/internal/metrics"

Expected behaviour

http.proxy.request spans tag http.url

Steps to reproduce

Environment

  • ddtrace version: 1.16.2
  • Configuration block (Datadog.configure ...):
Datadog.configure do |config|
  # ...
  config.tracing.instrument :rails, request_queuing: :exclude_request, web_service_name: "excellent-application"
  # ...
end
  • Ruby version: 3.1.2
  • Operating system: various
  • Relevant library versions:

tylerwillingham avatar Dec 07 '23 23:12 tylerwillingham

👋 @tylerwillingham , if I understand this correctly, the root span changes from rack.request to http.proxy.request and you are expecting http.proxy.request to contain the http.url tag like rack.request?

TonyCTHsu avatar Jan 11 '24 15:01 TonyCTHsu

@TonyCTHsu yeah exactly - I think that would be the solution for our team

Once we enabled request_queuing our agent-level rejections set via filter_tags stopped working.

Example `filter_tags` agent configuration

      filter_tags:
        reject:
          - "http.url:/health"
          - "http.url:/internal/metrics"

If we opt-out of the request_queuing feature, the traces drop again (I believe because the filter tags are respected once again).

tylerwillingham avatar Jan 11 '24 15:01 tylerwillingham