-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
30 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,30 @@ defmodule MongoosePush do | |
:timer.tc(module, :push, [notification, device_id, pool, opts]) | ||
end | ||
|
||
:telemetry.execute( | ||
[:mpush, :push], | ||
This comment has been minimized.
Sorry, something went wrong. |
||
%{time: time}, | ||
case push_result do | ||
This comment has been minimized.
Sorry, something went wrong.
rslota
Contributor
|
||
{:error, {type, reason}} -> | ||
%{ | ||
result: :error, | ||
type: type, | ||
reason: reason | ||
} | ||
|
||
{:error, reason} -> | ||
This comment has been minimized.
Sorry, something went wrong.
rslota
Contributor
|
||
%{ | ||
result: :error, | ||
reason: reason | ||
} | ||
|
||
other -> | ||
%{ | ||
result: other | ||
} | ||
end | ||
) | ||
|
||
push_result | ||
|> Metrics.update(:spiral, [:push, service, mode]) | ||
|> Metrics.update(:timer, [:push, service, mode], time) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I know it's tempting to shorten the name of this app, but I would suggest to keep this one as a "rule" - always using full application name as first element of event name.