Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
aurweb
Commits
87b94ce0
Verified
Commit
87b94ce0
authored
Mar 08, 2022
by
Kevin Morris
Browse files
Merge branch 'master' into live
parents
f45aafc0
97917046
Pipeline
#16410
passed with stages
in 6 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
aurweb/prometheus.py
View file @
87b94ce0
...
...
@@ -70,9 +70,17 @@ def http_requests_total() -> Callable[[Info], None]:
if
not
(
scope
.
get
(
"endpoint"
,
None
)
and
scope
.
get
(
"router"
,
None
)):
return
None
root_path
=
scope
.
get
(
"root_path"
,
""
)
app
=
scope
.
get
(
"app"
,
{})
if
hasattr
(
app
,
"root_path"
):
app_root_path
=
getattr
(
app
,
"root_path"
)
if
root_path
.
startswith
(
app_root_path
):
root_path
=
root_path
[
len
(
app_root_path
):]
base_scope
=
{
"type"
:
scope
.
get
(
"type"
),
"path"
:
scope
.
get
(
"
root_path
"
,
""
)
+
scope
.
get
(
"path"
),
"path"
:
root_path
+
scope
.
get
(
"path"
),
"path_params"
:
scope
.
get
(
"path_params"
,
{}),
"method"
:
scope
.
get
(
"method"
)
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment