Skip to content

Commit

Permalink
attempting to get celery to show up in xray (#2244)
Browse files Browse the repository at this point in the history
  • Loading branch information
P0NDER0SA authored Aug 2, 2024
1 parent bc1086e commit 8a5f959
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run_celery.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env python
import newrelic.agent # See https://bit.ly/2xBVKBH
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
from dotenv import load_dotenv
from flask import Flask

Expand All @@ -12,4 +14,8 @@

application = Flask("celery")
create_app(application)

xray_recorder.configure(service='celery')
XRayMiddleware(application, xray_recorder)

application.app_context().push()

0 comments on commit 8a5f959

Please sign in to comment.