You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
temp generated agent.jar file in windows/Temp folder should be removed automatically because the programmer did not write or program to create the jar file.
Actual behavior
The file agent.jar in windows/Temp/otel-agentXXXXXXXXXX/agent.jar is not getting deleted. It creates an out-of-memory issue on the server. Admin is not supposed to write batch process to write windows based another batch script to delete these files
To Reproduce
any spring boot-based batch process using application-insights lib 3.4.12 will reproduce the same issue
System information
Please provide the following information:
SDK Version: java 1.8-351
OS type and version: windows 10
Application Server type and version (if applicable):
Using spring-boot? yes
Additional relevant libraries (with version, if applicable):
Logs
logs are just file but in windows/Temp/otel-agentXXXXXXXX/agent.jar files are creating pollution. there is a well-known issue of Windows OS java can not delete jar file bugs.openjdk.org/browse/JDK-8219681. but using RandomAccessFile class of standard jdk lib it must be possible to delete the file. RunTime.getRuntime.addShutdownHook() or deleteonExit() definitely should work. Or ApplicationInsights-agent lib has to manage this without creating an agent.jar file
Screenshots
Not possible to bring screenshots here
The text was updated successfully, but these errors were encountered:
Hi @fred-sudo
Thank you for having reported this issue.
Application Insights runtime attach component uses a runtime attach OpenTelemetry component. file.deleteOnExit() is invoked (deleteOnExit() uses a JVM shutdown hook behind the scene).
We could look at this issue on Microsoft side. Would you be interested in fixing this issue on the OTel side? In this case, we could help you contribute to the OTel component.
Thank you so much I would be happy to fix the issue on OTel side. I can work on [private static void deleteTempDirOnJvmExit(] with the other options mentioned. my observation -- this issue is on the Windows server only. for my laptop OS it could not see these jar files in Windows/Temp folder.
Expected behavior
temp generated agent.jar file in windows/Temp folder should be removed automatically because the programmer did not write or program to create the jar file.
Actual behavior
The file agent.jar in windows/Temp/otel-agentXXXXXXXXXX/agent.jar is not getting deleted. It creates an out-of-memory issue on the server. Admin is not supposed to write batch process to write windows based another batch script to delete these files
To Reproduce
any spring boot-based batch process using application-insights lib 3.4.12 will reproduce the same issue
System information
Please provide the following information:
Logs
logs are just file but in windows/Temp/otel-agentXXXXXXXX/agent.jar files are creating pollution. there is a well-known issue of Windows OS java can not delete jar file bugs.openjdk.org/browse/JDK-8219681. but using RandomAccessFile class of standard jdk lib it must be possible to delete the file. RunTime.getRuntime.addShutdownHook() or deleteonExit() definitely should work. Or ApplicationInsights-agent lib has to manage this without creating an agent.jar file
Screenshots
Not possible to bring screenshots here
The text was updated successfully, but these errors were encountered: