-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Is your feature request related to a problem? Please describe.
I'm using Spring Boot app and I was hoping I could utilize the CRaC project. My app uses this javaagent to send observability data to server.
In order for CRaC to work, so called checkpoint must be captured, and restored. Before checkpoint is captured, all open connections, sockets and files must be closed. Also, when restoring the checkpoint, every such connection,socket and file must be reopened so the app can perform the same way before the checkpoint was taken.
So the problem here is that opentelemetry java agent has an open connection to server where it sends data to, and from the java code, we have no way to close/reopen such connection, meaning capturing the checkpoint is impossible.
Describe the solution you'd like
The solution would be to make opentelemetry javaagent CRaC compatible, meaning that the agent can automatically respond to checkpoint capturing/restoring by closing /reopening connections,sockets and files it manages.
That way capturing the checkpoint would be possible.
Describe alternatives you've considered
Here is the list of all things I tried. All of them failed or we gave up on them for different reasons:
- Considered using opentelemetry SDK
- Tried to use dynamic attach mechanism to attach javaagent at runtime, when the checkpoint is restored
- Force killing all connections from the app to try and capture the checkpoint
- Starting the agent without a way for it to connect to server it uploads data to
Additional context
Other javaagents have the same issue with CRaC and are actively working on it:
elastic/apm-agent-java#2982
newrelic/newrelic-java-agent#1697