dd-trace-rb
dd-trace-rb copied to clipboard
Add extra service configuration for RC
What does this PR do?
Add extra service configuration for RC
Motivation
Service names can be mixed and matched in many ways, sometimes in complex ways that cannot be automatically inferred. For this information to be properly relayed in the most complex cases manual configuration is necessary.
Additional Notes
It may be possible to automate population of this field in the future (depends on configuration system evolution).
How to test the change?
Here's a typical configuration example, where:
- main service name is different from sub-services provided by integrations
- remote service name is made to match main service name
- rack and rails service names are different, and subject to remote configuration for this process as well
- request queuing is handled, creates a synthetic span which belongs to another service in another process, and so is not provided as extra service for RC.
Datadog.configure do |c|
c.service = 'web'
c.tracing.enabled = true
c.tracing.instrument :rack, service_name: 'web-rack', request_queuing: true, web_service_name: 'nginx'
c.tracing.instrument :rails, service_name: 'web-rails'
c.remote.enabled = true
c.remote.service = 'web'
c.remote.extra_services = ['web-rack', 'web-rails']
end
What is extra_services
? It wasn't clear from my immediate read. I'm also curious how this lines up against some of our other service name changes.
Codecov Report
Merging #3032 (af340e2) into master (2557a9a) will decrease coverage by
0.01%
. Report is 109 commits behind head on master. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #3032 +/- ##
==========================================
- Coverage 98.16% 98.16% -0.01%
==========================================
Files 1283 1283
Lines 73915 73952 +37
Branches 3425 3428 +3
==========================================
+ Hits 72560 72594 +34
- Misses 1355 1358 +3
Files | Coverage Δ | |
---|---|---|
lib/datadog/core/configuration/settings.rb | 98.54% <100.00%> (+0.06%) |
:arrow_up: |
lib/datadog/core/remote/client.rb | 91.37% <100.00%> (+0.30%) |
:arrow_up: |
spec/datadog/core/configuration/settings_spec.rb | 100.00% <100.00%> (ø) |
|
spec/datadog/core/remote/client_spec.rb | 100.00% <100.00%> (ø) |
... and 2 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
I've discussed this with Loic, and since we ended up not using it, I'm going to go ahead and close this PR for now :)