Skip to content

Commit cc7bc02

Browse files
authored
Merge branch 'master' into szokeasaurusrex/sample_rand-2
2 parents 8cdcb70 + 5d26201 commit cc7bc02

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/release-comment-issues.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ jobs:
1717
steps:
1818
- name: Get version
1919
id: get_version
20-
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT
20+
env:
21+
INPUTS_VERSION: ${{ github.event.inputs.version }}
22+
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
23+
run: echo "version=${$INPUTS_VERSION:-$RELEASE_TAG_NAME}" >> "$GITHUB_OUTPUT"
2124

2225
- name: Comment on linked issues that are mentioned in release
2326
if: |
@@ -28,4 +31,4 @@ jobs:
2831
uses: getsentry/release-comment-issues-gh-action@v1
2932
with:
3033
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
version: ${{ steps.get_version.outputs.version }}
34+
version: ${{ steps.get_version.outputs.version }}

sentry_sdk/integrations/asgi.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,18 @@ def event_processor(self, event, hint, asgi_scope):
267267
event["request"] = deepcopy(request_data)
268268

269269
# Only set transaction name if not already set by Starlette or FastAPI (or other frameworks)
270-
already_set = event["transaction"] != _DEFAULT_TRANSACTION_NAME and event[
271-
"transaction_info"
272-
].get("source") in [
273-
TransactionSource.COMPONENT,
274-
TransactionSource.ROUTE,
275-
TransactionSource.CUSTOM,
276-
]
270+
transaction = event.get("transaction")
271+
transaction_source = (event.get("transaction_info") or {}).get("source")
272+
already_set = (
273+
transaction is not None
274+
and transaction != _DEFAULT_TRANSACTION_NAME
275+
and transaction_source
276+
in [
277+
TransactionSource.COMPONENT,
278+
TransactionSource.ROUTE,
279+
TransactionSource.CUSTOM,
280+
]
281+
)
277282
if not already_set:
278283
name, source = self._get_transaction_name_and_source(
279284
self.transaction_style, asgi_scope

0 commit comments

Comments
 (0)