Skip to content

Commit 251e27d

Browse files
ynouriantonpirkerHazAT
authored
Add decorator for Sentry tracing (#1089)
* Add decorator for Sentry tracing --------- Co-authored-by: Anton Pirker <[email protected]> Co-authored-by: Daniel Griesser <[email protected]>
1 parent e952020 commit 251e27d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+399
-79
lines changed

.github/workflows/test-common.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Common
1+
name: Test common
22

33
on:
44
push:
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -18,18 +24,20 @@ env:
1824
1925
jobs:
2026
test:
21-
name: Test Python ${{ matrix.python-version }}, ${{ matrix.os }}
27+
name: common, python ${{ matrix.python-version }}, ${{ matrix.os }}
2228
runs-on: ${{ matrix.os }}
2329
timeout-minutes: 45
24-
continue-on-error: true
30+
2531
strategy:
32+
fail-fast: false
2633
matrix:
34+
python-version: ["2.7","3.5","3.6","3.7","3.8","3.9","3.10","3.11"]
2735
# python3.6 reached EOL and is no longer being supported on
2836
# new versions of hosted runners on Github Actions
2937
# ubuntu-20.04 is the last version that supported python3.6
3038
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3139
os: [ubuntu-20.04]
32-
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
40+
3341
steps:
3442
- uses: actions/checkout@v3
3543
- uses: actions/setup-python@v4
@@ -38,16 +46,28 @@ jobs:
3846

3947
- name: Setup Test Env
4048
run: |
41-
pip install codecov tox
49+
pip install codecov "tox>=3,<4"
4250
43-
- name: Run Tests
51+
- name: Test common
4452
timeout-minutes: 45
4553
shell: bash
4654
run: |
4755
set -x # print commands that are executed
4856
coverage erase
4957
50-
./scripts/runtox.sh "py${{ matrix.python-version }}$" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch --ignore=tests/integrations
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5159
coverage combine .coverage*
5260
coverage xml -i
5361
codecov --file coverage.xml
62+
63+
check_required_tests:
64+
name: All common tests passed or skipped
65+
needs: test
66+
# Always run this, even if a dependent job failed
67+
if: always()
68+
runs-on: ubuntu-20.04
69+
steps:
70+
- name: Check for failures
71+
if: contains(needs.test.result, 'failure')
72+
run: |
73+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

.github/workflows/test-integration-aiohttp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-arq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-asgi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-aws_lambda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-beam.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-boto3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-bottle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-celery.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

.github/workflows/test-integration-chalice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -x # print commands that are executed
5656
coverage erase
5757
58-
./scripts/runtox.sh "${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5959
coverage combine .coverage*
6060
coverage xml -i
6161
codecov --file coverage.xml

0 commit comments

Comments
 (0)