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 web_service_name option to Rack through Rails tracer #2716

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Surgo
Copy link

@Surgo Surgo commented Mar 24, 2023

Allow passing web_service_name like #2082

@Surgo Surgo requested a review from a team March 24, 2023 08:52
@github-actions github-actions bot added integrations Involves tracing integrations tracing labels Mar 24, 2023
Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, @Surgo! 🙇
Would you mind adding a test to cover this new option?

Copy link
Contributor

@buraizu buraizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, approving with a minor update for accessibility

docs/GettingStarted.md Show resolved Hide resolved
@esalter
Copy link

esalter commented Sep 26, 2023

bump! Would love to see this land.

@tylerwillingham
Copy link
Contributor

Just voicing support - my team would love to see this land too :)

@@ -49,6 +49,8 @@ def initialize(options = {})
end

option :distributed_tracing, default: true, type: :bool
option :request_queuing, default: false, type: :bool
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is probably not needed here as this option is still defined on line 55

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed at cb9ccbe

@marcotc
Copy link
Member

marcotc commented Oct 24, 2023

@Surgo is there an issue with this being done at the Rack level, c.tracing.instrument :rack, web_service_name: ...?

@tylerwillingham
Copy link
Contributor

tylerwillingham commented Nov 8, 2023

@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-commenter
Copy link

codecov-commenter commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@langsharpe
Copy link

langsharpe commented Jun 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Involves tracing integrations tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants