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

Unable to configure several http services with different service names #1204

Closed
mattias-lundell opened this issue Oct 15, 2020 · 2 comments
Closed
Milestone

Comments

@mattias-lundell
Copy link

mattias-lundell commented Oct 15, 2020

Expected behavior

When I configure http multiplexing (seems to have been added in #953) I expect to have several http services with service names being matched using the describe: REGEX functionality.

Actual behavior

All traces ends up under the last configured service.

Steps to reproduce

Minimal failing test case consists of adding configuration for another service after an existing one and that one will now be picked.

diff --git a/spec/ddtrace/contrib/http/request_spec.rb b/spec/ddtrace/contrib/http/request_spec.rb
index 1825089c..8e305126 100644
--- a/spec/ddtrace/contrib/http/request_spec.rb
+++ b/spec/ddtrace/contrib/http/request_spec.rb
@@ -235,6 +235,10 @@ RSpec.describe 'net/http requests' do
             http.service_name = 'bar'
             http.split_by_domain = false
           end
+          c.use :http, describe: /zzz\.com/ do |http|
+            http.service_name = 'zzz'
+            http.split_by_domain = false
+          end
         end
       end

Generates failure

Failures:

  1) net/http requests when split by domain and the host matches a specific configuration uses the configured service name over the domain name
     Failure/Error: expect(span.service).to eq('bar')

       expected: "bar"
            got: "zzz"

       (compared using ==)
     # ./spec/ddtrace/contrib/http/request_spec.rb:247:in `block (4 levels) in <top (required)>'
     # ./spec/ddtrace/contrib/http/request_spec.rb:31:in `block (2 levels) in <top (required)>'
@ericmustin
Copy link
Contributor

Thanks for the report @mattias-lundell . I've been able to reproduce this locally. There are a few issues here, not the least of which is I believe this config option ought to be describes and not describe. So the documentation is off, but even using describes the issue still persists for me. I'm investigating this now and will keep this issue updated as soon as I have more information.

@ericmustin ericmustin added this to the 0.43.0 milestone Nov 18, 2020
@marcotc
Copy link
Member

marcotc commented Nov 18, 2020

👋 @mattias-lundell, we've shipped a fix for this issue in 0.43.0. I'm closing this issue as done.

Please let us now if you still have any feedback on it.

@marcotc marcotc closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants