aws / aws/aws-xray-daemon

Cannot send Django regions to XRAY on aws

Open
#151 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Go
Stars
193
Forks
73
Avg merge
2d 7h
Merged PRs (30d)
3

Description

I have a EC2 instance, with XRAY daemon installed in it. Also, policy AWSXRayDaemonWriteAccess is attached to the role.

Simple Django application deployed to EC2, with default xray configuration.

In the application logs I see:

File "/usr/local/lib/python3.9/site-packages/botocore/httpsession.py", line 352, in send raise EndpointConnectionError(endpoint_url=request.url, error=e) botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "http://127.0.0.1:2000/GetSamplingRules"

I have the following configurations in django app:

XRAY_RECORDER = {
'AWS_XRAY_CONTEXT_MISSING': 'LOG_ERROR',
'AWS_XRAY_TRACING_NAME': 'My application',
'PLUGINS': ('EC2Plugin', 'ECSPlugin'),
}
Why the application fails to connect to Xray daemon?

Also, When I execute `curl 'http://127.0.0.1:2000'` I got accessdeniedexception, why does it happen?

Contributor guide

Open the contributing guide

Research direction

Start with the Django XRAY_RECORDER configuration and the EC2 X-Ray daemon endpoint at 127.0.0.1:2000; compare the application’s EndpointConnectionError with the curl response. Done means identifying why the application cannot reach the daemon and explaining the AccessDeniedException with a reproducible diagnostic path.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, django, python
Domain
backend, cloud, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.