fix(tracing): remove internal extra field from the trace config
This commit removes the internal extra field from the trace config structure exposed to the user via the HTTP API.
This commit is contained in:
parent
9e46c18443
commit
2890bc2619
|
@ -255,11 +255,10 @@ format(Traces) ->
|
||||||
fun(Trace0 = #?TRACE{}) ->
|
fun(Trace0 = #?TRACE{}) ->
|
||||||
[_ | Values] = tuple_to_list(Trace0),
|
[_ | Values] = tuple_to_list(Trace0),
|
||||||
Map0 = maps:from_list(lists:zip(Fields, Values)),
|
Map0 = maps:from_list(lists:zip(Fields, Values)),
|
||||||
Extra0 = maps:get(extra, Map0, #{}),
|
Extra = maps:get(extra, Map0, #{}),
|
||||||
Formatter = maps:get(formatter, Extra0, text),
|
Formatter = maps:get(formatter, Extra, text),
|
||||||
Map1 = Map0#{formatter => Formatter},
|
Map1 = Map0#{formatter => Formatter},
|
||||||
Extra1 = maps:remove(formatter, Extra0),
|
maps:remove(extra, Map1)
|
||||||
maps:put(extra, Extra1, Map1)
|
|
||||||
end,
|
end,
|
||||||
Traces
|
Traces
|
||||||
).
|
).
|
||||||
|
|
|
@ -96,7 +96,6 @@ t_base_create_delete(_Config) ->
|
||||||
start_at => Now,
|
start_at => Now,
|
||||||
end_at => Now + 30 * 60,
|
end_at => Now + 30 * 60,
|
||||||
payload_encode => text,
|
payload_encode => text,
|
||||||
extra => #{},
|
|
||||||
formatter => text
|
formatter => text
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue