feat: add stop after render and after render trace to redis action

This commit is contained in:
Kjell Winblad 2024-04-24 14:48:23 +02:00
parent 74fac80e7e
commit 2abc1b1141
1 changed files with 10 additions and 1 deletions

View File

@ -107,7 +107,7 @@ on_query(InstId, {cmd, Cmd}, #{conn_st := RedisConnSt}) ->
Result;
on_query(
InstId,
{_MessageTag, _Data} = Msg,
{MessageTag, _Data} = Msg,
#{channels := Channels, conn_st := RedisConnSt}
) ->
case try_render_message([Msg], Channels) of
@ -116,6 +116,10 @@ on_query(
redis_bridge_connector_cmd,
#{cmd => Cmd, batch => false, mode => sync}
),
emqx_trace:rendered_action_template(
MessageTag,
#{command => Cmd, batch => false, mode => sync}
),
Result = query(InstId, {cmd, Cmd}, RedisConnSt),
?tp(
redis_bridge_connector_send_done,
@ -135,6 +139,11 @@ on_batch_query(
redis_bridge_connector_send,
#{batch_data => BatchData, batch => true, mode => sync}
),
[{ChannelID, _} | _] = BatchData,
emqx_trace:rendered_action_template(
ChannelID,
#{commands => Cmds, batch => ture, mode => sync}
),
Result = query(InstId, {cmds, Cmds}, RedisConnSt),
?tp(
redis_bridge_connector_send_done,