feat: add stop after render and after render trace to cassandra action
This commit is contained in:
parent
810aa68b02
commit
a2dd8f5aee
|
@ -87,7 +87,7 @@ unsubscribe(<<"$SYS/", _/binary>>, _SubOpts) ->
|
||||||
unsubscribe(Topic, SubOpts) ->
|
unsubscribe(Topic, SubOpts) ->
|
||||||
?TRACE("UNSUBSCRIBE", "unsubscribe", #{topic => Topic, sub_opts => SubOpts}).
|
?TRACE("UNSUBSCRIBE", "unsubscribe", #{topic => Topic, sub_opts => SubOpts}).
|
||||||
|
|
||||||
rendered_action_template(ActionID, RenderResult) when is_binary(ActionID) ->
|
rendered_action_template(<<"action:", _/binary>> = ActionID, RenderResult) ->
|
||||||
TraceResult = ?TRACE(
|
TraceResult = ?TRACE(
|
||||||
"QUERY_RENDER",
|
"QUERY_RENDER",
|
||||||
"action_template_rendered",
|
"action_template_rendered",
|
||||||
|
|
|
@ -223,6 +223,11 @@ do_single_query(InstId, Request, Async, #{pool_name := PoolName} = State) ->
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
{PreparedKeyOrCQL1, Data} = proc_cql_params(Type, PreparedKeyOrCQL, Params, State),
|
{PreparedKeyOrCQL1, Data} = proc_cql_params(Type, PreparedKeyOrCQL, Params, State),
|
||||||
|
emqx_trace:rendered_action_template(PreparedKeyOrCQL, #{
|
||||||
|
type => Type,
|
||||||
|
key_or_cql => PreparedKeyOrCQL1,
|
||||||
|
data => Data
|
||||||
|
}),
|
||||||
Res = exec_cql_query(InstId, PoolName, Type, Async, PreparedKeyOrCQL1, Data),
|
Res = exec_cql_query(InstId, PoolName, Type, Async, PreparedKeyOrCQL1, Data),
|
||||||
handle_result(Res).
|
handle_result(Res).
|
||||||
|
|
||||||
|
@ -261,6 +266,14 @@ do_batch_query(InstId, Requests, Async, #{pool_name := PoolName} = State) ->
|
||||||
state => State
|
state => State
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
ChannelID =
|
||||||
|
case Requests of
|
||||||
|
[{CID, _} | _] -> CID;
|
||||||
|
_ -> none
|
||||||
|
end,
|
||||||
|
emqx_trace:rendered_action_template(ChannelID, #{
|
||||||
|
cqls => CQLs
|
||||||
|
}),
|
||||||
Res = exec_cql_batch_query(InstId, PoolName, Async, CQLs),
|
Res = exec_cql_batch_query(InstId, PoolName, Async, CQLs),
|
||||||
handle_result(Res).
|
handle_result(Res).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue