Skip to content

Commit e7a20f2

Browse files
committed
Merge branch 'neel/potel/initial-scope-management' into neel/potel/span-processor
2 parents 7dba029 + 9bfab81 commit e7a20f2

File tree

178 files changed

+3887
-1000
lines changed

Some content is hidden

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

178 files changed

+3887
-1000
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
timeout-minutes: 10
2525

2626
steps:
27-
- uses: actions/[email protected].6
27+
- uses: actions/[email protected].7
2828
- uses: actions/setup-python@v5
2929
with:
3030
python-version: 3.12
@@ -39,7 +39,7 @@ jobs:
3939
timeout-minutes: 10
4040

4141
steps:
42-
- uses: actions/[email protected].6
42+
- uses: actions/[email protected].7
4343
- uses: actions/setup-python@v5
4444
with:
4545
python-version: 3.12
@@ -54,7 +54,7 @@ jobs:
5454
timeout-minutes: 10
5555

5656
steps:
57-
- uses: actions/[email protected].6
57+
- uses: actions/[email protected].7
5858
- uses: actions/setup-python@v5
5959
with:
6060
python-version: 3.12
@@ -82,7 +82,7 @@ jobs:
8282
timeout-minutes: 10
8383

8484
steps:
85-
- uses: actions/[email protected].6
85+
- uses: actions/[email protected].7
8686
- uses: actions/setup-python@v5
8787
with:
8888
python-version: 3.12

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/[email protected].6
49+
uses: actions/[email protected].7
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
name: "Release a new version"
2020
steps:
21-
- uses: actions/[email protected].6
21+
- uses: actions/[email protected].7
2222
with:
2323
token: ${{ secrets.GH_RELEASE_PAT }}
2424
fetch-depth: 0
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: Test AI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release/**
7+
- sentry-sdk-2.0
8+
pull_request:
9+
# Cancel in progress workflows on pull_requests.
10+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
permissions:
15+
contents: read
16+
env:
17+
BUILD_CACHE_KEY: ${{ github.sha }}
18+
CACHED_BUILD_PATHS: |
19+
${{ github.workspace }}/dist-serverless
20+
jobs:
21+
test-ai-latest:
22+
name: AI (latest)
23+
timeout-minutes: 30
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
python-version: ["3.7","3.9","3.11","3.12"]
29+
# python3.6 reached EOL and is no longer being supported on
30+
# new versions of hosted runners on Github Actions
31+
# ubuntu-20.04 is the last version that supported python3.6
32+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
33+
os: [ubuntu-20.04]
34+
steps:
35+
- uses: actions/[email protected]
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
- name: Setup Test Env
40+
run: |
41+
pip install coverage tox
42+
- name: Erase coverage
43+
run: |
44+
coverage erase
45+
- name: Test anthropic latest
46+
run: |
47+
set -x # print commands that are executed
48+
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest"
49+
- name: Test cohere latest
50+
run: |
51+
set -x # print commands that are executed
52+
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest"
53+
- name: Test langchain latest
54+
run: |
55+
set -x # print commands that are executed
56+
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
57+
- name: Test openai latest
58+
run: |
59+
set -x # print commands that are executed
60+
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest"
61+
- name: Test huggingface_hub latest
62+
run: |
63+
set -x # print commands that are executed
64+
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
65+
- name: Generate coverage XML
66+
if: ${{ !cancelled() }}
67+
run: |
68+
coverage combine .coverage*
69+
coverage xml -i
70+
- name: Upload coverage to Codecov
71+
if: ${{ !cancelled() }}
72+
uses: codecov/[email protected]
73+
with:
74+
token: ${{ secrets.CODECOV_TOKEN }}
75+
files: coverage.xml
76+
- name: Upload test results to Codecov
77+
if: ${{ !cancelled() }}
78+
uses: codecov/test-results-action@v1
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}
81+
test-ai-pinned:
82+
name: AI (pinned)
83+
timeout-minutes: 30
84+
runs-on: ${{ matrix.os }}
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
python-version: ["3.7","3.9","3.11","3.12"]
89+
# python3.6 reached EOL and is no longer being supported on
90+
# new versions of hosted runners on Github Actions
91+
# ubuntu-20.04 is the last version that supported python3.6
92+
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
93+
os: [ubuntu-20.04]
94+
steps:
95+
- uses: actions/[email protected]
96+
- uses: actions/setup-python@v5
97+
with:
98+
python-version: ${{ matrix.python-version }}
99+
- name: Setup Test Env
100+
run: |
101+
pip install coverage tox
102+
- name: Erase coverage
103+
run: |
104+
coverage erase
105+
- name: Test anthropic pinned
106+
run: |
107+
set -x # print commands that are executed
108+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-anthropic"
109+
- name: Test cohere pinned
110+
run: |
111+
set -x # print commands that are executed
112+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cohere"
113+
- name: Test langchain pinned
114+
run: |
115+
set -x # print commands that are executed
116+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
117+
- name: Test openai pinned
118+
run: |
119+
set -x # print commands that are executed
120+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai"
121+
- name: Test huggingface_hub pinned
122+
run: |
123+
set -x # print commands that are executed
124+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub"
125+
- name: Generate coverage XML
126+
if: ${{ !cancelled() }}
127+
run: |
128+
coverage combine .coverage*
129+
coverage xml -i
130+
- name: Upload coverage to Codecov
131+
if: ${{ !cancelled() }}
132+
uses: codecov/[email protected]
133+
with:
134+
token: ${{ secrets.CODECOV_TOKEN }}
135+
files: coverage.xml
136+
- name: Upload test results to Codecov
137+
if: ${{ !cancelled() }}
138+
uses: codecov/test-results-action@v1
139+
with:
140+
token: ${{ secrets.CODECOV_TOKEN }}
141+
check_required_tests:
142+
name: All AI tests passed
143+
needs: test-ai-pinned
144+
# Always run this, even if a dependent job failed
145+
if: always()
146+
runs-on: ubuntu-20.04
147+
steps:
148+
- name: Check for failures
149+
if: contains(needs.test-ai-pinned.result, 'failure') || contains(needs.test-ai-pinned.result, 'skipped')
150+
run: |
151+
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1

.github/workflows/test-integrations-aws-lambda.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
name: permissions check
3131
runs-on: ubuntu-20.04
3232
steps:
33-
- uses: actions/[email protected].6
33+
- uses: actions/[email protected].7
3434
with:
3535
persist-credentials: false
3636
- name: Check permissions on PR
@@ -65,7 +65,7 @@ jobs:
6565
os: [ubuntu-20.04]
6666
needs: check-permissions
6767
steps:
68-
- uses: actions/[email protected].6
68+
- uses: actions/[email protected].7
6969
with:
7070
ref: ${{ github.event.pull_request.head.sha || github.ref }}
7171
- uses: actions/setup-python@v5
@@ -80,15 +80,23 @@ jobs:
8080
- name: Test aws_lambda pinned
8181
run: |
8282
set -x # print commands that are executed
83-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
83+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
8484
- name: Generate coverage XML
85+
if: ${{ !cancelled() }}
8586
run: |
8687
coverage combine .coverage*
8788
coverage xml -i
88-
- uses: codecov/codecov-action@v4
89+
- name: Upload coverage to Codecov
90+
if: ${{ !cancelled() }}
91+
uses: codecov/[email protected]
8992
with:
9093
token: ${{ secrets.CODECOV_TOKEN }}
9194
files: coverage.xml
95+
- name: Upload test results to Codecov
96+
if: ${{ !cancelled() }}
97+
uses: codecov/test-results-action@v1
98+
with:
99+
token: ${{ secrets.CODECOV_TOKEN }}
92100
check_required_tests:
93101
name: All AWS Lambda tests passed
94102
needs: test-aws_lambda-pinned

.github/workflows/test-integrations-cloud-computing.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
python-version: ["3.7","3.10","3.11","3.12"]
28+
python-version: ["3.8","3.11","3.12"]
2929
# python3.6 reached EOL and is no longer being supported on
3030
# new versions of hosted runners on Github Actions
3131
# ubuntu-20.04 is the last version that supported python3.6
3232
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3333
os: [ubuntu-20.04]
3434
steps:
35-
- uses: actions/[email protected].6
35+
- uses: actions/[email protected].7
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
@@ -45,27 +45,35 @@ jobs:
4545
- name: Test boto3 latest
4646
run: |
4747
set -x # print commands that are executed
48-
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
48+
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest"
4949
- name: Test chalice latest
5050
run: |
5151
set -x # print commands that are executed
52-
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
52+
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest"
5353
- name: Test cloud_resource_context latest
5454
run: |
5555
set -x # print commands that are executed
56-
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
56+
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest"
5757
- name: Test gcp latest
5858
run: |
5959
set -x # print commands that are executed
60-
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60+
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest"
6161
- name: Generate coverage XML
62+
if: ${{ !cancelled() }}
6263
run: |
6364
coverage combine .coverage*
6465
coverage xml -i
65-
- uses: codecov/codecov-action@v4
66+
- name: Upload coverage to Codecov
67+
if: ${{ !cancelled() }}
68+
uses: codecov/[email protected]
6669
with:
6770
token: ${{ secrets.CODECOV_TOKEN }}
6871
files: coverage.xml
72+
- name: Upload test results to Codecov
73+
if: ${{ !cancelled() }}
74+
uses: codecov/test-results-action@v1
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
6977
test-cloud_computing-pinned:
7078
name: Cloud Computing (pinned)
7179
timeout-minutes: 30
@@ -80,7 +88,7 @@ jobs:
8088
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
8189
os: [ubuntu-20.04]
8290
steps:
83-
- uses: actions/[email protected].6
91+
- uses: actions/[email protected].7
8492
- uses: actions/setup-python@v5
8593
with:
8694
python-version: ${{ matrix.python-version }}
@@ -93,27 +101,35 @@ jobs:
93101
- name: Test boto3 pinned
94102
run: |
95103
set -x # print commands that are executed
96-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
104+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3"
97105
- name: Test chalice pinned
98106
run: |
99107
set -x # print commands that are executed
100-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
108+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice"
101109
- name: Test cloud_resource_context pinned
102110
run: |
103111
set -x # print commands that are executed
104-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
112+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context"
105113
- name: Test gcp pinned
106114
run: |
107115
set -x # print commands that are executed
108-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
116+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp"
109117
- name: Generate coverage XML
118+
if: ${{ !cancelled() }}
110119
run: |
111120
coverage combine .coverage*
112121
coverage xml -i
113-
- uses: codecov/codecov-action@v4
122+
- name: Upload coverage to Codecov
123+
if: ${{ !cancelled() }}
124+
uses: codecov/[email protected]
114125
with:
115126
token: ${{ secrets.CODECOV_TOKEN }}
116127
files: coverage.xml
128+
- name: Upload test results to Codecov
129+
if: ${{ !cancelled() }}
130+
uses: codecov/test-results-action@v1
131+
with:
132+
token: ${{ secrets.CODECOV_TOKEN }}
117133
check_required_tests:
118134
name: All Cloud Computing tests passed
119135
needs: test-cloud_computing-pinned

.github/workflows/test-integrations-common.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
3333
os: [ubuntu-20.04]
3434
steps:
35-
- uses: actions/[email protected].6
35+
- uses: actions/[email protected].7
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: ${{ matrix.python-version }}
@@ -45,15 +45,23 @@ jobs:
4545
- name: Test common pinned
4646
run: |
4747
set -x # print commands that are executed
48-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
48+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common"
4949
- name: Generate coverage XML
50+
if: ${{ !cancelled() }}
5051
run: |
5152
coverage combine .coverage*
5253
coverage xml -i
53-
- uses: codecov/codecov-action@v4
54+
- name: Upload coverage to Codecov
55+
if: ${{ !cancelled() }}
56+
uses: codecov/[email protected]
5457
with:
5558
token: ${{ secrets.CODECOV_TOKEN }}
5659
files: coverage.xml
60+
- name: Upload test results to Codecov
61+
if: ${{ !cancelled() }}
62+
uses: codecov/test-results-action@v1
63+
with:
64+
token: ${{ secrets.CODECOV_TOKEN }}
5765
check_required_tests:
5866
name: All Common tests passed
5967
needs: test-common-pinned

0 commit comments

Comments
 (0)