Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
24232c67
Unverified
Commit
24232c67
authored
5 months ago
by
Ngoc Khuat
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
add more logging for sending pulse (#48286)
parent
e2b74d79
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/pulse.clj
+8
-4
8 additions, 4 deletions
src/metabase/pulse.clj
with
8 additions
and
4 deletions
src/metabase/pulse.clj
+
8
−
4
View file @
24232c67
...
...
@@ -294,7 +294,8 @@
(
vswap!
retry-errors
conj
e
)
;; Token errors have already been logged and we should not retry.
(
when-not
(
should-retry-sending?
e
(
:type
channel
))
(
throw
e
)))))]
(
throw
e
))
(
log/warnf
"[Pulse %d] Failed to send to channel %s %d, retring..."
pulse-id
(
:type
channel
)
(
:id
channel
)))))]
(
task-history/with-task-history
{
:task
"channel-send"
:on-success-info
(
fn
[
update-map
_result
]
(
cond->
update-map
...
...
@@ -306,7 +307,8 @@
:channel-type
(
:type
channel
)
:channel-id
(
:id
channel
)
:pulse-id
pulse-id
}}
((
retry/decorate
send!
(
retry/random-exponential-backoff-retry
(
str
(
random-uuid
))
retry-config
)))))
((
retry/decorate
send!
(
retry/random-exponential-backoff-retry
(
str
(
random-uuid
))
retry-config
)))
(
log/debugf
"[Pulse %d] Sent to channel %s %d with %d retires"
pulse-id
(
:type
channel
)
(
:id
channel
)
(
count
@
retry-errors
))))
(
catch
Throwable
e
(
log/error
e
"Error sending notification!"
))))
...
...
@@ -353,13 +355,15 @@
messages
(
channel/render-notification
(
:type
channel
)
(
get-notification-info
pulse
parts
pulse-channel
)
(
channel-recipients
pulse-channel
))]
(
log/debugf
"Rendered %d messages for %s %d to channel %s"
(
log/debugf
"[Pulse %d] Rendered %d messages for %s %d to channel %s"
pulse-id
(
count
messages
)
(
alert-or-pulse
pulse
)
(
:id
pulse
)
(
:type
channel
))
(
doseq
[
message
messages
]
(
log/debugf
"Sending %s %d to channel %s"
(
log/debugf
"[Pulse %d] Sending %s %d to channel %s"
pulse-id
(
alert-or-pulse
pulse
)
(
:id
pulse
)
(
:channel_type
pulse-channel
))
...
...
This diff is collapsed.
Click to expand it.
Nicholas Bentley
@nbentley
mentioned in commit
9753b21d
·
5 months ago
mentioned in commit
9753b21d
mentioned in commit 9753b21d6ecee42cf782d7742b9ebe5f808af49f
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment