Skip to content

Commit

Permalink
Merge branch 'master' into reexport-cron-symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Jun 11, 2024
2 parents 5c9b2b2 + 1a6a66e commit e4706c5
Show file tree
Hide file tree
Showing 75 changed files with 2,917 additions and 853 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -39,7 +39,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -54,7 +54,7 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: 3.12
Expand All @@ -67,7 +67,6 @@ jobs:
- name: Build Packages
run: |
echo "Creating directory containing Python SDK Lambda Layer"
pip install virtualenv
# This will also trigger "make dist" that creates the Python packages
make aws-lambda-layer
- name: Upload Python Packages
Expand All @@ -83,13 +82,12 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: 3.12

- run: |
pip install virtualenv
make apidocs
cd docs/_build && zip -r gh-pages ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.4
uses: actions/checkout@v4.1.6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-aws-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: permissions check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
with:
persist-credentials: false
- name: Check permissions on PR
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
os: [ubuntu-20.04]
needs: check-permissions
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- uses: actions/setup-python@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-cloud-computing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-data-processing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-integrations-databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -77,10 +77,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-redis-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test rediscluster latest
- name: Test redis_py_cluster_legacy latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-rediscluster-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
./scripts/runtox.sh "py${{ matrix.python-version }}-redis_py_cluster_legacy-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test sqlalchemy latest
run: |
set -x # print commands that are executed
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -152,10 +152,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-redis" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test rediscluster pinned
- name: Test redis_py_cluster_legacy pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rediscluster" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-redis_py_cluster_legacy" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test sqlalchemy pinned
run: |
set -x # print commands that are executed
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-miscellaneous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-networking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-web-frameworks-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
SENTRY_PYTHON_TEST_POSTGRES_USER: postgres
SENTRY_PYTHON_TEST_POSTGRES_PASSWORD: sentry
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-web-frameworks-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.1.6
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
Expand Down
112 changes: 112 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,117 @@
# Changelog

## 2.5.1

This change fixes a regression in our cron monitoring feature, which caused cron checkins not to be sent. The regression appears to have been introduced in version 2.4.0.

**We recommend that all users, who use Cron monitoring and are currently running sentry-python ≥2.4.0, upgrade to this release as soon as possible!**

### Other fixes & improvements

- feat(tracing): Warn if not-started transaction entered (#3003) by @szokeasaurusrex
- test(scope): Ensure `last_event_id` cleared (#3124) by @szokeasaurusrex
- fix(scope): Clear last_event_id on scope clear (#3124) by @szokeasaurusrex

## 2.5.0

### Various fixes & improvements

- Allow to configure status codes to report to Sentry in Starlette and FastAPI (#3008) by @sentrivana

By passing a new option to the FastAPI and Starlette integrations, you're now able to configure what
status codes should be sent as events to Sentry. Here's how it works:

```python
from sentry_sdk.integrations.starlette import StarletteIntegration
from sentry_sdk.integrations.fastapi import FastApiIntegration

sentry_sdk.init(
# ...
integrations=[
StarletteIntegration(
failed_request_status_codes=[403, range(500, 599)],
),
FastApiIntegration(
failed_request_status_codes=[403, range(500, 599)],
),
]
)
```

`failed_request_status_codes` expects a list of integers or containers (objects that allow membership checks via `in`)
of integers. Examples of valid `failed_request_status_codes`:

- `[500]` will only send events on HTTP 500.
- `[400, range(500, 599)]` will send events on HTTP 400 as well as the 500-599 range.
- `[500, 503]` will send events on HTTP 500 and 503.

The default is `[range(500, 599)]`.

See the [FastAPI](https://docs.sentry.io/platforms/python/integrations/fastapi/) and [Starlette](https://docs.sentry.io/platforms/python/integrations/starlette/) integration docs for more details.

- Support multiple keys with `cache_prefixes` (#3136) by @sentrivana
- Support integer Redis keys (#3132) by @sentrivana
- Update SDK version in CONTRIBUTING.md (#3129) by @sentrivana
- Bump actions/checkout from 4.1.4 to 4.1.5 (#3067) by @dependabot

## 2.4.0

### Various fixes & improvements

- Celery: Made `cache.key` span data field a list (#3110) by @antonpirker
- Celery Beat: Refactor the Celery Beat integration (#3105) by @antonpirker
- GRPC: Add None check for grpc.aio interceptor (#3109) by @ordinary-jamie
- Docs: Remove `last_event_id` from migration guide (#3126) by @szokeasaurusrex
- fix(django): Proper transaction names for i18n routes (#3104) by @sentrivana
- fix(scope): Copy `_last_event_id` in `Scope.__copy__` (#3123) by @szokeasaurusrex
- fix(tests): Adapt to new Anthropic version (#3119) by @sentrivana
- build(deps): bump checkouts/data-schemas from `4381a97` to `59f9683` (#3066) by @dependabot

## 2.3.1

### Various fixes & improvements

- Handle also byte arras as strings in Redis caches (#3101) by @antonpirker
- Do not crash exceptiongroup (by patching excepthook and keeping the name of the function) (#3099) by @antonpirker

## 2.3.0

### Various fixes & improvements

- NEW: Redis integration supports now Sentry Caches module. See https://docs.sentry.io/product/performance/caches/ (#3073) by @antonpirker
- NEW: Django integration supports now Sentry Caches module. See https://docs.sentry.io/product/performance/caches/ (#3009) by @antonpirker
- Fix `cohere` testsuite for new release of `cohere` (#3098) by @antonpirker
- Fix ClickHouse integration where `_sentry_span` might be missing (#3096) by @sentrivana

## 2.2.1

### Various fixes & improvements

- Add conditional check for delivery_info's existence (#3083) by @cmanallen
- Updated deps for latest langchain version (#3092) by @antonpirker
- Fixed grpcio extras to work as described in the docs (#3081) by @antonpirker
- Use pythons venv instead of virtualenv to create virtual envs (#3077) by @antonpirker
- Celery: Add comment about kwargs_headers (#3079) by @szokeasaurusrex
- Celery: Queues module producer implementation (#3079) by @szokeasaurusrex
- Fix N803 flake8 failures (#3082) by @szokeasaurusrex

## 2.2.0

### New features

- Celery integration now sends additional data to Sentry to enable new features to guage the health of your queues
- Added a new integration for Cohere
- Reintroduced the `last_event_id` function, which had been removed in 2.0.0

### Other fixes & improvements

- Add tags + data passing functionality to @ai_track (#3071) by @colin-sentry
- Only propagate headers from spans within transactions (#3070) by @szokeasaurusrex
- Improve type hints for set metrics (#3048) by @elramen
- Fix `get_client` typing (#3063) by @szokeasaurusrex
- Auto-enable Anthropic integration + gate imports (#3054) by @colin-sentry
- Made `MeasurementValue.unit` NotRequired (#3051) by @antonpirker

## 2.1.1

- Fix trace propagation in Celery tasks started by Celery Beat. (#3047) by @antonpirker
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ This project follows [semver](https://semver.org/), with three additions:

- Certain features (e.g. integrations) may be explicitly called out as "experimental" or "unstable" in the documentation. They come with their own versioning policy described in the documentation.

We recommend to pin your version requirements against `1.x.*` or `1.x.y`.
We recommend to pin your version requirements against `2.x.*` or `2.x.y`.
Either one of the following is fine:

```
sentry-sdk>=1.0.0,<2.0.0
sentry-sdk==1.5.0
sentry-sdk>=2.0.0,<3.0.0
sentry-sdk==2.4.0
```

A major release `N` implies the previous release `N-1` will no longer receive updates. We generally do not backport bugfixes to older versions unless they are security relevant. However, feel free to ask for backports of specific commits on the bugtracker.
Loading

0 comments on commit e4706c5

Please sign in to comment.