aws / aws/aws-xray-sdk-python

xray_recorder.capture decorator does not show anything on XRAY

Open
#199 2 comments 2 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
338
Forks
147
PR merge metrics
No merged PRs in 30d

Description

I am using Flask to handle requests in my application. My application is on ECS Fargate and I have a separated Docker container in which the XRay daemon resides on it. XRay console shows the requests coming to Flask correctly. So far so good. Here is the code snippet for using Flask middleware:

```
app = Flask(__name__)
xray_recorder.configure(
service="APP",
sampling=True,
context_missing='LOG_ERROR',
plugins=('ECSPlugin',),
daemon_address='127.0.0.1:2000'
)

XRayMiddleware(app, xray_recorder)
```

My problem is when I using `xray_recorder.capture` decorator to my function in other python files, XRay won't show me anything. Here is the code that I used:

```
from aws_xray_sdk.core import xray_recorder
class Test:
def __init__(self):
pass

@xray_recorder.capture('## run')
def run(self):
...
...
...

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.