chore: add changelog for create trace

This commit is contained in:
Zhongwen Deng 2023-04-12 17:14:30 +08:00
parent f161399bcc
commit 45254c5936
3 changed files with 12 additions and 3 deletions

View File

@ -44,7 +44,8 @@
-type tracer() :: #{
name := binary(),
type := clientid | topic | ip_address,
filter := emqx_types:clientid() | emqx_types:topic() | emqx_trace:ip_address()
filter := emqx_types:clientid() | emqx_types:topic() | emqx_trace:ip_address(),
payload_encode := text | hidden | hex
}.
-define(CONFIG(_LogFile_), #{
@ -70,7 +71,12 @@
LogFilePath :: string()
) -> ok | {error, term()}.
install(Name, Type, Filter, Level, LogFile) ->
Who = #{type => Type, filter => ensure_bin(Filter), name => ensure_bin(Name)},
Who = #{
type => Type,
filter => ensure_bin(Filter),
name => ensure_bin(Name),
payload_encode => payload_encode()
},
install(Who, Level, LogFile).
-spec install(

View File

@ -273,7 +273,8 @@ fields(trace) ->
"Determine the format of the payload format in the trace file.<br/>\n"
"`text`: Text-based protocol or plain text protocol.\n"
" It is recommended when payload is JSON encoded.<br/>\n"
"`hex`: Binary hexadecimal encode. It is recommended when payload is a custom binary protocol.<br/>\n"
"`hex`: Binary hexadecimal encode."
"It is recommended when payload is a custom binary protocol.<br/>\n"
"`hidden`: payload is obfuscated as `******`"
"",
default => text,

View File

@ -0,0 +1,2 @@
Deprecate the trace.payload_encode configuration.
Add payload_encode=[text,hidden,hex] option when creating a trace via HTTP API.