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

`rack.request` span that are stopped in middleware or before action doesn't have resource set

Open beauraF opened this issue 1 year ago • 4 comments

Hello everyone 👋

I'm opening a dedicated bug report following this discussion.

This has a significant impact on the monitoring and alerting systems implemented by our teams. Since these spans have no resources, it is not possible to infer a team from them. This broke the reporting of dashboard built by team, and also our custom code that set a service to a rack.request based on the resource.

I've already seen several teams remove before_action, by calling directly into the controller's action to workaround this behavior ; after often spending several hours before understanding this subtlety.

@delner you made a proposal in the initial discussion, is that's still the direction you want to go in?


Current behaviour rack.request span that are stopped in middleware or before action doesn't have resource set

Expected behaviour rack.request span that are stopped in before action have resource set. Middleware also?

Environment

  • ddtrace version: 1.20.0
  • Ruby version: 3.2.3

beauraF avatar Feb 25 '24 09:02 beauraF