fix(emqx_telemetry): make dialyzer happy
This commit is contained in:
parent
9c1f77d733
commit
e6fb27b3c7
|
@ -1,6 +1,6 @@
|
||||||
{application, emqx_telemetry, [
|
{application, emqx_telemetry, [
|
||||||
{description, "Report telemetry data for EMQX Opensource edition"},
|
{description, "Report telemetry data for EMQX Opensource edition"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.1"},
|
||||||
{registered, [emqx_telemetry_sup, emqx_telemetry]},
|
{registered, [emqx_telemetry_sup, emqx_telemetry]},
|
||||||
{mod, {emqx_telemetry_app, []}},
|
{mod, {emqx_telemetry_app, []}},
|
||||||
{applications, [
|
{applications, [
|
||||||
|
|
|
@ -365,7 +365,7 @@ report_telemetry(State0 = #state{url = URL}) ->
|
||||||
{State, Data} = get_telemetry(State0),
|
{State, Data} = get_telemetry(State0),
|
||||||
case emqx_utils_json:safe_encode(Data) of
|
case emqx_utils_json:safe_encode(Data) of
|
||||||
{ok, Bin} ->
|
{ok, Bin} ->
|
||||||
httpc_request(post, URL, [], Bin),
|
ok = httpc_request(post, URL, [], Bin),
|
||||||
?tp(debug, telemetry_data_reported, #{});
|
?tp(debug, telemetry_data_reported, #{});
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
%% debug? why?
|
%% debug? why?
|
||||||
|
@ -376,7 +376,8 @@ report_telemetry(State0 = #state{url = URL}) ->
|
||||||
httpc_request(Method, URL, Headers, Body) ->
|
httpc_request(Method, URL, Headers, Body) ->
|
||||||
HTTPOptions = [{timeout, 10_000}, {ssl, [{verify, verify_none}]}],
|
HTTPOptions = [{timeout, 10_000}, {ssl, [{verify, verify_none}]}],
|
||||||
Options = [],
|
Options = [],
|
||||||
httpc:request(Method, {URL, Headers, "application/json", Body}, HTTPOptions, Options).
|
_ = httpc:request(Method, {URL, Headers, "application/json", Body}, HTTPOptions, Options),
|
||||||
|
ok.
|
||||||
|
|
||||||
parse_os_release(FileContent) ->
|
parse_os_release(FileContent) ->
|
||||||
lists:foldl(
|
lists:foldl(
|
||||||
|
|
Loading…
Reference in New Issue