Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
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
TeDomum
Matrix
Commits
d328a93b
Commit
d328a93b
authored
6 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fixup error handling and message
parent
dc5efc92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/config/metrics.py
+6
-5
6 additions, 5 deletions
synapse/config/metrics.py
with
6 additions
and
5 deletions
synapse/config/metrics.py
+
6
−
5
View file @
d328a93b
...
...
@@ -16,11 +16,8 @@
from
._base
import
Config
,
ConfigError
MISSING_SENTRY
=
(
"""
Missing sentry
_
sdk library. This is required to enable sentry
"""
Missing sentry
-
sdk library. This is required to enable sentry
integration.
Install by running:
pip install sentry_sdk
"""
)
...
...
@@ -39,7 +36,11 @@ class MetricsConfig(Config):
except
ImportError
:
raise
ConfigError
(
MISSING_SENTRY
)
self
.
sentry_dsn
=
config
[
"
sentry
"
][
"
dsn
"
]
self
.
sentry_dsn
=
config
[
"
sentry
"
].
get
(
"
dsn
"
)
if
not
self
.
sentry_dsn
:
raise
ConfigError
(
"
sentry.dsn field is required when sentry integration is enabled
"
,
)
def
default_config
(
self
,
report_stats
=
None
,
**
kwargs
):
res
=
"""
\
...
...
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