sile / jaeger_passage
Showing 1 of 2 files from the diff.

@@ -74,7 +74,7 @@
Loading
74 74
                      | {process_tags, passage:tags()}.
75 75
%% <ul>
76 76
%%   <li><b>endpoint</b>: The jaeger endpoint URL for sending thrift messages. The default value is `http://127.0.0.1:14268'.</li>
77 -
%%   <li><b>http_client</b>: The callback to call to send span to jaeger.</li>
77 +
%%   <li><b>http_client</b>: The callback to call to send span to jaeger. The httpc client is used by default.</li>
78 78
%%   <li><b>default_service_name</b>: The default service name. If a reporting span has `location.application' tag, the value is used as the service name instead of this. The default value is `ReporterId'.</li>
79 79
%%   <li><b>process_tags</b>: The tags of the reporting process. The default value is `#{}'.</li>
80 80
%% </ul>
@@ -112,8 +112,8 @@
Loading
112 112
    Endpoint = proplists:get_value(endpoint, Options, "http://127.0.0.1:14268"),
113 113
    EndpointURL = Endpoint ++ "/api/traces",
114 114
115 -
    HttpClient = proplists:get_value(http_client, Options),
116 -
    HttpClient =/= undefined orelse error(badarg, [ReporterId, Options]),
115 +
    HttpClient = proplists:get_value(http_client, Options, fun httpc_client/5),
116 +
    is_function(HttpClient, 5) orelse error(badarg, [ReporterId, Options]),
117 117
118 118
    DefaultServiceName = proplists:get_value(default_service_name, Options, ReporterId),
119 119
    Tags0 = proplists:get_value(process_tags, Options, #{}),
@@ -171,3 +171,15 @@
Loading
171 171
    Headers = [?CONTENT_TYPE],
172 172
    HttpClient(URI, post, Headers, Encoded, Options),
173 173
    {noreply, State}.
174 +
175 +
-spec httpc_client(
176 +
        Url    :: string(),
177 +
        Method :: post,
178 +
        Headers :: [{string(), string()}],
179 +
        Body :: string() | binary(),
180 +
        ReporterOptions :: start_options()) ->
181 +
    ok.
182 +
183 +
httpc_client(Url, Method, _Headers, Body, _ReporterOptions) ->
184 +
    httpc:request(Method, {Url, [], "application/x-thrift", Body}, [], []),
185 +
    ok.
Files Coverage
src 85.32%
Project Totals (11 files) 85.32%
73.2
TRAVIS_OS_NAME=linux
73.1
TRAVIS_OS_NAME=linux
73.4
TRAVIS_OS_NAME=linux
73.3
TRAVIS_OS_NAME=linux

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading