Skip to content

Commit 13ec40e

Browse files
getsentry-botwedamija
authored andcommitted
Revert "fix(profiling): keep frame-level platform information when available in mixed stack traces (#68694)"
This reverts commit d7a32bb. Co-authored-by: wedamija <6288560+wedamija@users.noreply.github.com>
1 parent ac055f5 commit 13ec40e

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/sentry/profiles/task.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ def process_profile_task(
148148
if not _normalize_profile(profile, organization, project):
149149
return
150150

151-
# set platform information at frame-level
152-
# only for those platforms that didn't go through symbolication
153-
_set_frames_platform(profile)
154-
155151
if "version" in profile:
156152
set_measurement("profile.samples.processed", len(profile["profile"]["samples"]))
157153
set_measurement("profile.stacks.processed", len(profile["profile"]["stacks"]))
@@ -641,9 +637,7 @@ def truncate_stack_needed(
641637
# This works since symbolicated_frames are in the same order
642638
# as raw_frames (except some frames are not sent).
643639
for frame_idx in symbolicated_frames_dict[symbolicated_frame_idx]:
644-
f = symbolicated_frames[frame_idx]
645-
f["platform"] = platform
646-
new_frames.append(f)
640+
new_frames.append(symbolicated_frames[frame_idx])
647641

648642
# go to the next symbolicated frame result
649643
symbolicated_frame_idx += 1
@@ -1121,17 +1115,3 @@ def _calculate_duration_for_sample_format_v2(profile: Profile) -> int:
11211115

11221116
def _calculate_duration_for_android_format(profile: Profile) -> int:
11231117
return int(profile["duration_ns"] * 1e-6)
1124-
1125-
1126-
def _set_frames_platform(profile: Profile):
1127-
if "version" in profile:
1128-
platform = profile["platform"]
1129-
if platform in ["javascript", "node", "cocoa"]:
1130-
# bail early because it was already set
1131-
return
1132-
for i, _ in enumerate(profile["profile"]["frames"]):
1133-
profile["profile"]["frames"]["platform"] = platform
1134-
return
1135-
elif profile["platform"] == "android":
1136-
for i, _ in enumerate(profile["profile"]["methods"]):
1137-
profile["profile"]["methods"][i] = "android"

0 commit comments

Comments
 (0)