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

Spring boot lambda starts twice with dd-trace-java library #4773

Open
pacome2018 opened this issue Feb 21, 2023 · 3 comments
Open

Spring boot lambda starts twice with dd-trace-java library #4773

pacome2018 opened this issue Feb 21, 2023 · 3 comments
Labels
comp: telemetry Telemetry tag: serverless Serverless support

Comments

@pacome2018
Copy link

Hello,

I'm having troubles with Spring Boot in Lambda when adding the Datadog tracer to my function.

As we can see in the log file, Spring Boot restarts after a successful but void first start.

I don't see anything suspisious between the two boots, maybe someone can help with the logs ?

Also, it used to work fine, problem appeared recently.
(I redeployed my AWS stacks. And now I can reproduce this issue with a new stack always with no changes on our side)

I tried with following versions :
dd-trace-java:8 (= v1.5.0) & Datadog-Extension-ARM:36 (and 37)
dd-trace-java:7 (= v1.1.3) & Datadog-Extension-ARM:34
tracer versions according to this project https://github.com/DataDog/datadog-lambda-java

log-spring-lambda-datadog.csv
Datadog tracer debugger is enabled.

Interesting line numbers for the logs :
l. 1255 Spring Boot 1st start
l. ~1310 Spring Boot stop
l. 2647 Spring Boot 2nd start

Interesting logs :
[dd-task-scheduler] WARN datadog.telemetry.dependency.DependencyResolverQueue - unable to detect dependency for URI file:/var/task/
[dd-task-scheduler] DEBUG datadog.telemetry.dependency.DependencyResolverQueue - unable to detect dependency for URI jrt:/jdk.localedata

@devinsba
Copy link
Contributor

devinsba commented Feb 21, 2023

Thanks for the report, someone will take a look. In case those errors are the cause of the issue to you can work around these errors by disabling that feature:

Environment variable: DD_INSTRUMENTATION_TELEMETRY_ENABLED=false

System property: dd.instrumentation.telemetry.enabled=false

@pacome2018
Copy link
Author

Thanks for the response, DD_INSTRUMENTATION_TELEMETRY_ENABLED=false did clear the warnings but the error remains.
Enabling Spring traces doesn't give interesting information.

@smola smola added tag: serverless Serverless support comp: telemetry Telemetry labels Mar 6, 2023
@pacome2018
Copy link
Author

We found out the problem was the Lambda had not enough memory to start SpringBoot after adding dd-tracer layer.

Sorry for the trouble, hope it helps if someone stumble upons this 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: telemetry Telemetry tag: serverless Serverless support
Projects
None yet
Development

No branches or pull requests

3 participants