elastic / elastic/apm-agent-java

Warning "Unexpected JVM command line syntax" when passing command line arguments containing slashes to instrumented application

Open
#4,269 2 comments 0 reactions 0 assignees View on GitHub
agent-java community enhancement
Dominant language
Java
Stars
594
Forks
338
Avg merge
1d 13h
Merged PRs (30d)
25

Description

## Describe the bug
The Boostrap-Check in https://github.com/elastic/apm-agent-java/blob/main/elastic-apm-agent-premain/src/main/java/co/elastic/apm/agent/premain/JvmToolBootstrapCheck.java#L63 logs a warning when command line arguments containing slashes are passed to the main method:

`[elastic-apm-agent] WARN Unexpected JVM command line syntax: org.example.Main --file /my/path/containing/slashes/file.txt`

## Steps to reproduce
Pass command line args containing slashes to an instrumented application.

## Expected behavior
No warning is logged.

## Debug logs
See above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.