chore: add changelog for create trace
This commit is contained in:
parent
f161399bcc
commit
45254c5936
|
@ -44,7 +44,8 @@
|
||||||
-type tracer() :: #{
|
-type tracer() :: #{
|
||||||
name := binary(),
|
name := binary(),
|
||||||
type := clientid | topic | ip_address,
|
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_), #{
|
-define(CONFIG(_LogFile_), #{
|
||||||
|
@ -70,7 +71,12 @@
|
||||||
LogFilePath :: string()
|
LogFilePath :: string()
|
||||||
) -> ok | {error, term()}.
|
) -> ok | {error, term()}.
|
||||||
install(Name, Type, Filter, Level, LogFile) ->
|
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).
|
install(Who, Level, LogFile).
|
||||||
|
|
||||||
-spec install(
|
-spec install(
|
||||||
|
|
|
@ -273,7 +273,8 @@ fields(trace) ->
|
||||||
"Determine the format of the payload format in the trace file.<br/>\n"
|
"Determine the format of the payload format in the trace file.<br/>\n"
|
||||||
"`text`: Text-based protocol or plain text protocol.\n"
|
"`text`: Text-based protocol or plain text protocol.\n"
|
||||||
" It is recommended when payload is JSON encoded.<br/>\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 `******`"
|
"`hidden`: payload is obfuscated as `******`"
|
||||||
"",
|
"",
|
||||||
default => text,
|
default => text,
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Deprecate the trace.payload_encode configuration.
|
||||||
|
Add payload_encode=[text,hidden,hex] option when creating a trace via HTTP API.
|
Loading…
Reference in New Issue