dd-trace-rb
dd-trace-rb copied to clipboard
Allow passing web_service_name option to Rack through Rails tracer
Allow passing web_service_name
like #2082
bump! Would love to see this land.
Just voicing support - my team would love to see this land too :)
@Surgo is there an issue with this being done at the Rack level, c.tracing.instrument :rack, web_service_name: ...
?
@marcotc @Surgo speaking from another team at another company that was also surprised to learn that we couldn't pass web_service_name
to the configuration for the rails
instrument (like we do with request_queuing
): we were similarly surprised when this option didn't pass through.
We spent a decent bit of time debugging and reading source code to realize "request_queuing" is getting special treatment (and it's pretty nice) but its sibling argument of "web_service_name" wasn't.
It feels like a precedent has been set to allow these args to pass through and it makes the configuration a little cleaner
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.22%. Comparing base (
22c0370
) to head (8d51f83
). Report is 1439 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2716 +/- ##
==========================================
- Coverage 98.23% 98.22% -0.01%
==========================================
Files 1253 1253
Lines 72690 72693 +3
Branches 3415 3415
==========================================
- Hits 71405 71404 -1
- Misses 1285 1289 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
is there an issue with this being done at the Rack level,
c.tracing.instrument :rack, web_service_name: ...
?
I'm finding this isn't working for us (gem version 1.23.2). Any ideas? Otherwise, it would be nice for this PR to be merged.
Edit: The workaround did work in version 2.1.0.
Datadog.configure do |config|
service_name = ENV.fetch("HEROKU_APP_NAME")
config.tracing.instrument :rails, service_name: service_name, request_queuing: true
...
config.tracing.instrument :rack, service_name: "#{service_name}-rack", web_service_name: "#{service_name}-puma"
end