Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource tagging/management of Rails Engines dynamically mounted on initialization (SubSystem Resources) #3635

Open
davidhatten opened this issue May 9, 2024 · 2 comments
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one

Comments

@davidhatten
Copy link

Is your feature request related to a problem? Please describe.
Problem: I mount engines to my Rails app which are entirely defined within an external gem (ex: Flipper UI, Sidekiq UI). When Datadog attempts to process the users making a request to one of these engines via link on the app dashboard UI, but Datadog groups the resource as a Rack request using the quantized name (GET 304) instead of something like Flipper#features (as though it were a proper resource defined by the application)

Describe the goal of the feature
To be able to view Engine-based resources as distinct traffic, labeled like the rest of my rails resources that Datadog shows me on the Service. EX: something like Flipper#features instead of a resource name of GET 304 with the path_group inside the trace being my info

Describe alternatives you've considered
I've played with the after_request hook to try to manually tag the traces, but that's going away in a future version.

I could try to monkey-patch something into the gems but that's fragile and opaque, and would have to be custom for each gem.

Additional context
I've specified flipper, but I am also doing this with the sidekiq UI.

The app in question does not run sidekiq or flipper itself either.

Basic code example:

routes.rb
...
mount Flipper::UI.app(flipper_adapter), at: '/flipper/my_app'
...

datadog.rb
...
c.tracing.instrument rails
...

How does datadog help you?
Love the profiling especially, incredible tool for checking behaviors and visualizing problems you don't know you have

@davidhatten davidhatten added community Was opened by a community member feature-request A request for a new feature or change to an existing one labels May 9, 2024
@marcotc
Copy link
Member

marcotc commented May 9, 2024

Hey @davidhatten, would be fair to summarize this as having applications there mounted separately from your main Rails application (ex: Flipper UI, Sidekiq UI) be displayed separately from the main Rails application requests?

For example: Flipper UI or Sidekiq UI would be the trace resource name for these mounted 3rd-party applications, in order to clearly show that they are not yet another Rack request or Rail controller from the main application.

@davidhatten
Copy link
Author

Hello! That summary is exactly correct from top to bottom!

The only thing I would add is that currently, the trace/resource name for these mounted 3rd-party applications is GET 302, GET 304, GET 202, etc etc.

Your suggestion of "Flipper UI/Sidekiq UI" would definitely be enough to work in my current workflow.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one
Projects
None yet
Development

No branches or pull requests

2 participants