Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use new func name in sentry-sdk celery config #997

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ factory-boy
fakeredis
freezegun
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
https://github.com/codecov/shared/archive/9c31870de026a8a3f026f0753b1991e8c832fadb.tar.gz#egg=shared
https://github.com/codecov/shared/archive/12361de9ed29116b068805c1f7bfd90e9d659de5.tar.gz#egg=shared
google-cloud-pubsub
gunicorn>=22.0.0
https://github.com/photocrowd/django-cursor-pagination/archive/f560902696b0c8509e4d95c10ba0d62700181d84.tar.gz
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ attrs==20.3.0
# jsonschema
billiard==4.2.0
# via celery
boto3==1.20.25
boto3==1.35.59
# via shared
botocore==1.23.25
botocore==1.35.59
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -411,7 +411,7 @@ sentry-sdk[celery]==2.13.0
# shared
setproctitle==1.1.10
# via -r requirements.in
shared @ https://github.com/codecov/shared/archive/9c31870de026a8a3f026f0753b1991e8c832fadb.tar.gz
shared @ https://github.com/codecov/shared/archive/12361de9ed29116b068805c1f7bfd90e9d659de5.tar.gz
# via -r requirements.in
simplejson==3.17.2
# via -r requirements.in
Expand Down
17 changes: 7 additions & 10 deletions services/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from celery.canvas import Signature
from django.conf import settings
from sentry_sdk import set_tag
from sentry_sdk.integrations.celery import _wrap_apply_async
from sentry_sdk.integrations.celery import _wrap_task_run
from shared import celery_config

from core.models import Repository
Expand All @@ -19,16 +19,13 @@

log = logging.getLogger(__name__)

# https://github.com/getsentry/sentry-python/issues/1416
if settings.SENTRY_ENV:
celery.group.apply_async = _wrap_apply_async(celery.group.apply_async)
celery.chunks.apply_async = _wrap_apply_async(celery.chunks.apply_async)
celery.canvas._chain.apply_async = _wrap_apply_async(
celery.canvas._chain.apply_async
)
celery.canvas._chord.apply_async = _wrap_apply_async(
celery.canvas._chord.apply_async
)
Signature.apply_async = _wrap_apply_async(Signature.apply_async)
celery.group.apply_async = _wrap_task_run(celery.group.apply_async)
celery.chunks.apply_async = _wrap_task_run(celery.chunks.apply_async)
celery.canvas._chain.apply_async = _wrap_task_run(celery.canvas._chain.apply_async)
celery.canvas._chord.apply_async = _wrap_task_run(celery.canvas._chord.apply_async)
Signature.apply_async = _wrap_task_run(Signature.apply_async)


class TaskService(object):
Expand Down
Loading