From 89b47e8ffccbeff5b9149f3fc2ab9866d4e611fa Mon Sep 17 00:00:00 2001 From: Kjell Winblad Date: Thu, 23 May 2024 12:41:30 +0200 Subject: [PATCH] fix(s3 tracing): do not format records as IO data in aggregate mode --- apps/emqx_bridge_s3/src/emqx_bridge_s3_connector.erl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/apps/emqx_bridge_s3/src/emqx_bridge_s3_connector.erl b/apps/emqx_bridge_s3/src/emqx_bridge_s3_connector.erl index dd0362e5d..bc9f37935 100644 --- a/apps/emqx_bridge_s3/src/emqx_bridge_s3_connector.erl +++ b/apps/emqx_bridge_s3/src/emqx_bridge_s3_connector.erl @@ -366,10 +366,7 @@ run_aggregated_upload(InstId, ChannelID, Records, #{aggreg_id := AggregId}) -> Timestamp = erlang:system_time(second), emqx_trace:rendered_action_template(ChannelID, #{ mode => aggregated, - records => #emqx_trace_format_func_data{ - function = fun render_records/1, - data = Records - } + records => Records }), case emqx_connector_aggregator:push_records(AggregId, Timestamp, Records) of ok -> @@ -379,13 +376,6 @@ run_aggregated_upload(InstId, ChannelID, Records, #{aggreg_id := AggregId}) -> {error, {unrecoverable_error, Reason}} end. -render_records(Records) -> - try - [unicode:characters_to_binary(R) || R <- Records] - catch - _:_ -> Records - end. - map_error({socket_error, _} = Reason) -> {recoverable_error, Reason}; map_error(Reason = {aws_error, Status, _, _Body}) when Status >= 500 ->