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
073f3b92
Unverified
Commit
073f3b92
authored
5 months ago
by
github-automation-metabase
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
logs should not be translated (#49033) (#49040)
Co-authored-by:
Alexander Solovyov
<
alexander@solovyov.net
>
parent
b8178a84
Branches
Branches containing commit
Tags
v0.9-final
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/server/middleware/log.clj
+13
-13
13 additions, 13 deletions
src/metabase/server/middleware/log.clj
src/metabase/util/jvm.clj
+1
-2
1 addition, 2 deletions
src/metabase/util/jvm.clj
with
14 additions
and
15 deletions
src/metabase/server/middleware/log.clj
+
13
−
13
View file @
073f3b92
...
...
@@ -14,7 +14,7 @@
[
metabase.server
:as
server
]
[
metabase.server.request.util
:as
req.util
]
[
metabase.util
:as
u
]
[
metabase.util.i18n
:as
i18n
:refer
[
deferred-tru
trs
]]
[
metabase.util.i18n
:as
i18n
:refer
[
deferred-tru
]]
[
metabase.util.log
:as
log
]
[
toucan2.core
:as
t2
])
(
:import
...
...
@@ -45,7 +45,7 @@
(
str
(
format
"%s %s %d"
(
u/upper-case-en
(
name
request-method
))
uri
status
)
(
when
async-status
(
format
" [
%s
: %s]"
(
trs
"ASYNC"
)
async-status
))))
(
format
" [
ASYNC
: %s]"
async-status
))))
(
defn-
format-performance-info
[{
:keys
[
start-time
call-count-fn
_diag-info-fn
]
...
...
@@ -53,28 +53,28 @@
call-count-fn
(
constantly
-1
)}}]
(
let
[
elapsed-time
(
u/format-nanoseconds
(
-
(
System/nanoTime
)
start-time
))
db-calls
(
call-count-fn
)]
(
trs
"{0} ({1}
DB calls)"
elapsed-time
db-calls
)))
(
format
"%s (%s
DB calls)"
elapsed-time
db-calls
)))
(
defn-
stats
[
diag-info-fn
]
(
str
(
when-let
[
^
PoolBackedDataSource
pool
(
let
[
data-source
(
mdb/data-source
)]
(
when
(
instance?
PoolBackedDataSource
data-source
)
data-source
))]
(
trs
"App DB connections:
{0}/{1}
"
(
.getNumBusyConnectionsAllUsers
pool
)
(
.getNumConnectionsAllUsers
pool
)))
(
format
"App DB connections:
%s/%s
"
(
.getNumBusyConnectionsAllUsers
pool
)
(
.getNumConnectionsAllUsers
pool
)))
" "
(
when-let
[
^
QueuedThreadPool
pool
(
some->
(
server/instance
)
.getThreadPool
)]
(
trs
"Jetty threads:
{0}/{1} ({2}
idle,
{3}
queued)"
(
.getBusyThreads
pool
)
(
.getMaxThreads
pool
)
(
.getIdleThreads
pool
)
(
.getQueueSize
pool
)))
(
format
"Jetty threads:
%s/%s (%s
idle,
%s
queued)"
(
.getBusyThreads
pool
)
(
.getMaxThreads
pool
)
(
.getIdleThreads
pool
)
(
.getQueueSize
pool
)))
" "
(
trs
"({0}
total active threads)"
(
Thread/activeCount
))
(
format
"(%s
total active threads)"
(
Thread/activeCount
))
" "
(
trs
"Queries in flight:
{0}
"
(
thread-pool/active-thread-count
))
(
format
"Queries in flight:
%s
"
(
thread-pool/active-thread-count
))
" "
(
trs
"({0}
queued)"
(
thread-pool/queued-thread-count
))
(
format
"(%s
queued)"
(
thread-pool/queued-thread-count
))
(
when
diag-info-fn
(
when-let
[
diag-info
(
not-empty
(
diag-info-fn
))]
(
format
...
...
This diff is collapsed.
Click to expand it.
src/metabase/util/jvm.clj
+
1
−
2
View file @
073f3b92
...
...
@@ -6,7 +6,6 @@
[
clojure.string
:as
str
]
[
clojure.tools.namespace.find
:as
ns.find
]
[
metabase.util.format
:as
u.format
]
[
metabase.util.i18n
:refer
[
tru
]]
[
metabase.util.log
:as
log
]
[
nano-id.core
:as
nano-id
])
(
:import
...
...
@@ -284,7 +283,7 @@
(
when
(
=
result
::timeout
)
(
when
(
future?
reff
)
(
future-cancel
reff
))
(
throw
(
TimeoutException.
(
tru
"Timed out after
{0}
"
(
u.format/format-milliseconds
timeout-ms
)))))
(
throw
(
TimeoutException.
(
format
"Timed out after
%s
"
(
u.format/format-milliseconds
timeout-ms
)))))
result
))
(
defn
do-with-timeout
...
...
This diff is collapsed.
Click to expand it.
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