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

Allow passing request_queuing option to Rack through Rails tracer #2082

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
| `request_queuing` | Track HTTP request time spent in the queue of the frontend server. See [HTTP request queuing](#http-request-queuing) for setup details. Set to `true` to enable. | `false` |
| `exception_controller` | Class or Module which identifies a custom exception controller class. Tracer provides improved error behavior when it can identify custom exception controllers. By default, without this option, it 'guesses' what a custom exception controller looks like. Providing this option aids this identification. | `nil` |
| `middleware` | Add the trace middleware to the Rails application. Set to `false` if you don't want the middleware to load. | `true` |
| `middleware_names` | Enables any short-circuited middleware requests to display the middleware name as a resource for the trace. | `false` |
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog/tracing/contrib/rails/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def initialize(options = {})
end

option :distributed_tracing, default: true

option :request_queuing, default: false

option :exception_controller do |o|
o.on_set do |value|
# Update ActionPack exception controller too
Expand Down
3 changes: 2 additions & 1 deletion lib/datadog/tracing/contrib/rails/framework.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def self.activate_rack!(datadog_config, rails_config)
application: ::Rails.application,
service_name: rails_config[:service_name],
middleware_names: rails_config[:middleware_names],
distributed_tracing: rails_config[:distributed_tracing]
distributed_tracing: rails_config[:distributed_tracing],
request_queuing: rails_config[:request_queuing]
)
end

Expand Down