Skip to content

Commit

Permalink
Add specific label clause for Q+Exchange resource
Browse files Browse the repository at this point in the history
  • Loading branch information
LoisSotoLopez committed Sep 24, 2024
1 parent 8268a11 commit 1e9ebd8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ label({RemoteAddress, Username, Protocol}) when is_binary(RemoteAddress), is_bin
V =/= <<>>
end, [{remote_address, RemoteAddress}, {username, Username},
{protocol, atom_to_binary(Protocol, utf8)}]);
label({
#resource{kind=queue, virtual_host=VHost, name=QName},
#resource{kind=exchange, name=ExName}
}) ->
<<"vhost=\"", (escape_label_value(VHost))/binary, "\",",
"exchange=\"", (escape_label_value(ExName))/binary, "\",",
"queue=\"", (escape_label_value(QName))/binary, "\"">>;
label({I1, I2}) ->
case {label(I1), label(I2)} of
{<<>>, L} -> L;
Expand Down

0 comments on commit 1e9ebd8

Please sign in to comment.