From: Siraaj Khandkar Date: Wed, 23 Sep 2015 21:18:57 +0000 (-0400) Subject: Register consumer process name. X-Git-Tag: 0.9.0 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=68d5c8f4e2a49f9d0dd192cd1a8fe71cb685e8be;p=beam_stats.git Register consumer process name. --- diff --git a/src/beam_stats.app.src b/src/beam_stats.app.src index 2dbb0cf..3dca90d 100644 --- a/src/beam_stats.app.src +++ b/src/beam_stats.app.src @@ -1,7 +1,7 @@ {application, beam_stats, [ {description, "Periodic VM stats production and consumption."}, - {vsn, "0.8.2"}, + {vsn, "0.9.0"}, {registered, []}, {applications, [ kernel diff --git a/src/beam_stats_consumer.erl b/src/beam_stats_consumer.erl index 3e46042..3c5ce1d 100644 --- a/src/beam_stats_consumer.erl +++ b/src/beam_stats_consumer.erl @@ -89,10 +89,11 @@ consume_async(PID, #beam_stats{}=BEAMStats) -> %% ============================================================================ start_link(ConsumerModule, ConsumerOptions) -> + RegisteredName = ConsumerModule, GenServerModule = ?MODULE, GenServerOpts = [], InitArgs = [ConsumerModule, ConsumerOptions], - gen_server:start_link(GenServerModule, InitArgs, GenServerOpts). + gen_server:start_link({local, RegisteredName}, GenServerModule, InitArgs, GenServerOpts). %% ============================================================================ %% gen_server callbacks (unused)