Skip to content

Commit

Permalink
stringify thread names
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylphrex committed Oct 20, 2022
1 parent 669bbb4 commit fba25ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sentry_sdk/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def slice_profile(self, start_ns, stop_ns):
# will not have any metadata associated with it.
thread_metadata = {
str(thread.ident): {
"name": thread.name,
"name": str(thread.name),
}
for thread in threading.enumerate()
} # type: Dict[str, ProcessedThreadMetadata]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def test_thread_scheduler_single_background_thread(scheduler_class):
current_thread = threading.current_thread()
thread_metadata = {
str(current_thread.ident): {
"name": current_thread.name,
"name": str(current_thread.name),
},
}

Expand Down

0 comments on commit fba25ec

Please sign in to comment.