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

xray_recorder.capture decorator does not show anything on XRAY #199

Open
ghost opened this issue Jan 24, 2020 · 2 comments
Open

xray_recorder.capture decorator does not show anything on XRAY #199

ghost opened this issue Jan 24, 2020 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jan 24, 2020

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): 
        ...
        ...
        ...

@awssandra
Copy link

Hi mostafafarzane,

Have you checked the daemon logs to confirm it is receiving traces?
Can you post a snippet of the logs?
They should be located at /var/log/xray/xray.log

How are you configuring your task definition for the Daemon?
We have some documentation on the configuration here: https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html

Thanks!
Sandra

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant