You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/01/27 21:22:12 UTC

[GitHub] [couchdb] chewbranca commented on a change in pull request #2494: Add http reporter

chewbranca commented on a change in pull request #2494: Add http reporter
URL: https://github.com/apache/couchdb/pull/2494#discussion_r371488948
 
 

 ##########
 File path: src/ctrace/src/ctrace_config.erl
 ##########
 @@ -98,17 +98,37 @@ maybe_start_main_tracer(TracerId) ->
 
 
 start_main_tracer(TracerId) ->
-    Sampler = passage_sampler_all:new(),
-    Options = [
-        {thrift_format,
-            list_to_atom(config:get("tracing", "thrift_format", "compact"))},
-        {agent_host, config:get("tracing", "agent_host", "127.0.0.1")},
-        {agent_port, config:get_integer("tracing", "agent_port", 6831)},
-        {default_service_name,
-            list_to_atom(config:get("tracing", "app_name", "couchdb"))}
-    ],
-    ok = jaeger_passage:start_tracer(TracerId, Sampler, Options).
+    MaxQueueLen = config:get_integer("tracing", "max_queue_len", 1024),
+    Sampler = jaeger_passage_sampler_queue_limit:new(
+        passage_sampler_all:new(), TracerId, MaxQueueLen),
+    ServiceName = list_to_atom(config:get("tracing", "app_name", "couchdb")),
+
+    case config:get("tracing", "protocol", "udp") of
+        "udp" ->
+            Options = [
+                {thrift_format, list_to_atom(
+                    config:get("tracing", "thrift_format", "compact"))},
+                {agent_host,
+                    config:get("tracing", "agent_host", "127.0.0.1")},
+                {agent_port,
+                    config:get_integer("tracing", "agent_port", 6831)},
+                {protocol, udp},
+                {default_service_name, ServiceName}
+           ],
+           jaeger_passage:start_tracer(TracerId, Sampler, Options);
 
 Review comment:
   Minor nit, but the previous version of this function matched `ok` against `jaeger_passage:start_tracer(...)`, whereas this version does not. Was that an intentional behavior change?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services