summaryrefslogtreecommitdiff
path: root/deps/rabbit_common/include/rabbit.hrl
diff options
context:
space:
mode:
authorLoïc Hoguin <essen@ninenines.eu>2017-11-29 11:02:18 +0100
committerLoïc Hoguin <essen@ninenines.eu>2017-12-12 12:35:41 +0100
commit29da36157a987149e7ad234e741720b29b9637fa (patch)
tree97ad7ce4b577a8d3fae07c025e9460bc75a6dd78 /deps/rabbit_common/include/rabbit.hrl
parent56f98cf0ce98447d6a01923e9821b48dda6fb614 (diff)
downloadrabbitmq-server-git-29da36157a987149e7ad234e741720b29b9637fa.tar.gz
Add a macro to identify processes in Looking Glass
Diffstat (limited to 'deps/rabbit_common/include/rabbit.hrl')
-rw-r--r--deps/rabbit_common/include/rabbit.hrl4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/rabbit_common/include/rabbit.hrl b/deps/rabbit_common/include/rabbit.hrl
index 1522dca55b..775b59ba0a 100644
--- a/deps/rabbit_common/include/rabbit.hrl
+++ b/deps/rabbit_common/include/rabbit.hrl
@@ -291,3 +291,7 @@
%% For event audit purposes
-define(INTERNAL_USER, <<"rmq-internal">>).
-define(UNKNOWN_USER, <<"unknown">>).
+
+%% Store metadata in the trace files when message tracing is enabled.
+-define(LG_INFO(Info), is_pid(whereis(lg)) andalso (lg ! Info)).
+-define(LG_PROCESS_TYPE(Type), ?LG_INFO(#{process_type => Type})).