Skip to content

Commit

Permalink
replace local function capture in telemetry_test (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethangunderson authored Jan 12, 2023
1 parent 0f1c30b commit 66be1a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/telemetry_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

-module(telemetry_test).

-export([attach_event_handlers/2]).
-export([attach_event_handlers/2, handle_event/4]).

%% @doc Attaches a "message" handler to the given events.
%%
Expand Down Expand Up @@ -52,7 +52,7 @@
attach_event_handlers(DestPID, Events) when is_pid(DestPID) and is_list(Events) ->
Ref = make_ref(),
Config = #{dest_pid => DestPID, ref => Ref},
telemetry:attach_many(Ref, Events, fun handle_event/4, Config),
telemetry:attach_many(Ref, Events, fun telemetry_test:handle_event/4, Config),
Ref.

handle_event(Event, Measurements, Metadata, #{dest_pid := DestPID, ref := Ref}) ->
Expand Down

0 comments on commit 66be1a6

Please sign in to comment.