Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ApplicationInsights-agent-3.4.12 generate otel-agentXXX/agent.jar files in windows/Temp which consumes all memory

Open
#3,183 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, spring-boot

Research direction

No source file or test is named. Start by reproducing the issue with a Spring Boot batch process using ApplicationInsights-agent 3.4.12 on Windows 10, then inspect how agent.jar is created and cleaned up in windows/Temp. Done means temporary otel-agent directories and agent.jar files are removed automatically without an administrator-maintained batch process.

Written by the indexing model from the issue text.

Description

Needs: Attention :wave:
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:

  • 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

Dominant language
Java
Stars
327
Forks
222
Avg merge
22h 34m
Merged PRs (30d)
14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/ApplicationInsights-Java

All issues in microsoft/ApplicationInsights-Java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.