Skip to content

Commit

Permalink
Try to fingerprint SB 3.2 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
kittylyst authored Feb 29, 2024
1 parent 6d58783 commit b218565
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/com/redhat/insights/agent/AgentSubreport.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class AgentSubreport implements InsightsSubreport {
static {
activeGuesses.put("org.springframework.boot.SpringApplication", __ -> "Spring Boot");
activeGuesses.put("org.springframework.boot.loader.Launcher", __ -> "Spring Boot");
// Since SB 3.2
activeGuesses.put("org.springframework.boot.loader.launch.Launcher", __ -> "Spring Boot");
activeGuesses.put("org.jboss.modules.Module", AgentSubreport::fingerprintJBoss);
activeGuesses.put(
"io.quarkus.bootstrap.runner.QuarkusEntryPoint", AgentSubreport::fingerprintQuarkus);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/redhat/insights/agent/Attach.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/** Dynamic attachment class for use on apps that are already running. */
public class Attach {
private static final int ATTACH_PARAM_SAFE_LIMIT = 250;

public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Need args: pid, options");
Expand All @@ -21,7 +23,7 @@ public static void main(String[] args) {

String pid = args[0];
String options = args[1];
if (options.length() > 100) {
if (options.length() > ATTACH_PARAM_SAFE_LIMIT) {
System.err.println(
"WARNING: option string is long, attach may fail. Usual cause of this is a long token - consider using a token file instead");
}
Expand Down

0 comments on commit b218565

Please sign in to comment.