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

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

Open
rcooper85 opened this issue Sep 30, 2021 · 2 comments
Open
Labels

Comments

@rcooper85
Copy link

rcooper85 commented Sep 30, 2021

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

@rcooper85 rcooper85 changed the title Java auto-instrumentation not sending any segments to daemon Java auto-instrumentation agent not sending any segments to xray-daemon Sep 30, 2021
@willarmiros
Copy link
Contributor

Hi @rcooper85,

Please enable debug logging on your java application as described here to determine if the agent is properly creating segments. You can also make sure you've setup networking for your daemon container here.

If there is nothing immediately obvious that's wrong with your setup from the above steps, I would recommend that you also consider using the AWS Distro for OpenTelemetry Java Agent & Collector. You can follow these docs for the agent and collector to get started with them on ECS, and support auto-instrumenting several more libraries by doing so.

@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

2 participants