Skip to content

Commit 6d1d7ed

Browse files
simplify client logic
1 parent 3e55795 commit 6d1d7ed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sentry_sdk/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,12 +1113,12 @@ def capture_event(
11131113

11141114
envelope = Envelope(headers=headers)
11151115

1116+
if is_transaction and isinstance(profile, Profile):
1117+
envelope.add_profile(profile.to_json(event_opt, self.options))
1118+
11161119
if is_transaction and not self.options["_experiments"].get(
11171120
"gen_ai_as_v2_spans", False
11181121
):
1119-
if isinstance(profile, Profile):
1120-
envelope.add_profile(profile.to_json(event_opt, self.options))
1121-
11221122
envelope.add_transaction(event_opt)
11231123
elif is_transaction:
11241124
split_spans = _split_gen_ai_spans(event_opt)

0 commit comments

Comments
 (0)