Skip to content

response_context selector fails when request results in broken pipe #4589

@danpayne17

Description

@danpayne17

Describe the bug
If the caller closes the connection before the router has a chance to respond (e.g. broken pipe), the router fails to apply any span tag attributes using the response_context selector

To Reproduce
Steps to reproduce the behavior:

  1. Configure router with response_context selector:
telemetry:
  instrumentation:
    spans:
      mode: spec_compliant
      router:
        attributes:
          graph-operation-type:
            response_context: operation_kind
  1. Configure subgraph to wait 10s before responding to calls
  2. Send request to router using curl
  3. Cancel the request (ctrl-c) while the subgraph is waiting to respond
  4. Observe that the graph-operation-type was not applied to the span tag

Expected behavior
response_context span tag attributes are still applied to the router span just as with other non-200 errors (e.g. if there is a 400 BAD REQUEST error, we still see all tag attributes from response_context selectors on the router span) even when we have a broken pipe

Router:

  • OS: Amazon Linux 2023
  • Version: 1.37.0

Additional context
We are ingesting traces into DataDog

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions