aws / aws/aws-xray-daemon

Java auto-instrumentation agent not sending any segments to xray-daemon

Open
#155 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 am running a simple Spring Boot Java microservice with the latest release of the xray-agent .jar. I have followed the documentation from [here](https://docs.aws.amazon.com/xray/latest/devguide/aws-x-ray-auto-instrumentation-agent-for-java.html). My application runs as an ECS service, with the xray-daemon as a sidecar container. The service runs in a vpc with a public subnet.

I then deploy my Java application with the x-ray daemon (3.3.3) running as a sidecar in ECS. The xray daemon ECS container has UDP port 2000 set. I have also included AWS_REGION=eu-west-2.

I then send a few HTTP requests to my service which returns a response. However, there is nothing logged by the javaagent or the xray daemon that suggests any segments/traces have been generated. Nothing appears in X-Ray.

One thing I do see in the daemon logs is "[ERROR] Get instance id metadata failed: RequestError: send request failed" but then shortly after I do see "Starting proxy http server on 0.0.0.0:2000"

The only thing I see in my Java application logs, linked to the javaagent is:
```
Picked up JAVA_TOOL_OPTIONS: -javaagent:/opt/xray-agent/disco/dicso-java-agent.jar=pluginPath=/opt/xray-agent/disco/disco-plugins
INFO: Reading X-Ray Agent config file at: file:/app.jar!/BOOT-INF/classes/xray-agent.json
com.amazonaws.xray.agent.runtime.config.XRaySDKConfiguration init
```

Both my Task and TaskExecution Roles have the AWSXRayFullAccess and AWSXRayDaemonWriteAccess policies applied.

Contributor guide

Open the contributing guide

Research direction

Start with the AWS X-Ray Java auto-instrumentation documentation and the ECS task configuration described in the report. Inspect the Java agent logs, xray-agent.json, and the daemon sidecar's UDP port 2000 setup, then compare behavior while sending HTTP requests. Done means generated segments reach the daemon and appear in X-Ray.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java, spring-boot
Domain
backend, cloud, observability-sre
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.