Skip to content

Commit

Permalink
Merge branch 'master' into szokeasaurusrex/sample_rand-2
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana authored Feb 26, 2025
2 parents 8cdcb70 + 5d26201 commit cc7bc02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release-comment-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
steps:
- name: Get version
id: get_version
run: echo "version=${{ github.event.inputs.version || github.event.release.tag_name }}" >> $GITHUB_OUTPUT
env:
INPUTS_VERSION: ${{ github.event.inputs.version }}
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
run: echo "version=${$INPUTS_VERSION:-$RELEASE_TAG_NAME}" >> "$GITHUB_OUTPUT"

- name: Comment on linked issues that are mentioned in release
if: |
Expand All @@ -28,4 +31,4 @@ jobs:
uses: getsentry/release-comment-issues-gh-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.get_version.outputs.version }}
version: ${{ steps.get_version.outputs.version }}
19 changes: 12 additions & 7 deletions sentry_sdk/integrations/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,18 @@ def event_processor(self, event, hint, asgi_scope):
event["request"] = deepcopy(request_data)

# Only set transaction name if not already set by Starlette or FastAPI (or other frameworks)
already_set = event["transaction"] != _DEFAULT_TRANSACTION_NAME and event[
"transaction_info"
].get("source") in [
TransactionSource.COMPONENT,
TransactionSource.ROUTE,
TransactionSource.CUSTOM,
]
transaction = event.get("transaction")
transaction_source = (event.get("transaction_info") or {}).get("source")
already_set = (
transaction is not None
and transaction != _DEFAULT_TRANSACTION_NAME
and transaction_source
in [
TransactionSource.COMPONENT,
TransactionSource.ROUTE,
TransactionSource.CUSTOM,
]
)
if not already_set:
name, source = self._get_transaction_name_and_source(
self.transaction_style, asgi_scope
Expand Down

0 comments on commit cc7bc02

Please sign in to comment.