File tree 2 files changed +11
-10
lines changed 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change
1
+ Fix reporting of default tags to Sentry, such as worker name. Broke in v1.108.0.
Original file line number Diff line number Diff line change @@ -681,17 +681,17 @@ def setup_sentry(hs: "HomeServer") -> None:
681
681
)
682
682
683
683
# We set some default tags that give some context to this instance
684
- with sentry_sdk .configure_scope () as scope :
685
- scope .set_tag ("matrix_server_name" , hs .config .server .server_name )
684
+ global_scope = sentry_sdk .Scope . get_global_scope ()
685
+ global_scope .set_tag ("matrix_server_name" , hs .config .server .server_name )
686
686
687
- app = (
688
- hs .config .worker .worker_app
689
- if hs .config .worker .worker_app
690
- else "synapse.app.homeserver"
691
- )
692
- name = hs .get_instance_name ()
693
- scope .set_tag ("worker_app" , app )
694
- scope .set_tag ("worker_name" , name )
687
+ app = (
688
+ hs .config .worker .worker_app
689
+ if hs .config .worker .worker_app
690
+ else "synapse.app.homeserver"
691
+ )
692
+ name = hs .get_instance_name ()
693
+ global_scope .set_tag ("worker_app" , app )
694
+ global_scope .set_tag ("worker_name" , name )
695
695
696
696
697
697
def setup_sdnotify (hs : "HomeServer" ) -> None :
You can’t perform that action at this time.
0 commit comments