|
@@ -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(
|