Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review
  • Loading branch information
amarziali committed May 28, 2025
commit db037c4c580e40cdda8c4186347bc45ac6fb3554
10 changes: 5 additions & 5 deletions internal-api/src/main/java/datadog/trace/api/ProcessTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static void fillJeeTags(SortedMap<String, String> tags) {
fillWebsphereTags(tags);
}

private static void insertSysPropIfPresent(
private static void insertTagFromSysPropIfPresent(
Map<String, String> tags, String propKey, String tagKey) {
String value = maybeGetSystemProperty(propKey);
if (value != null) {
Expand All @@ -71,7 +71,7 @@ private static String maybeGetSystemProperty(String propKey) {
return null;
}

private static boolean insertEnvIfPresent(
private static boolean insertTagFromEnvIfPresent(
Map<String, String> tags, String envKey, String tagKey) {
try {
String value = envGetter.apply(envKey);
Expand Down Expand Up @@ -128,16 +128,16 @@ private static void fillBaseTags(Map<String, String> tags) {
private static boolean fillJbossTags(Map<String, String> tags) {
if (insertLastPathSegmentIfPresent(
tags, maybeGetSystemProperty("jboss.home.dir"), "jboss.home")) {
insertSysPropIfPresent(tags, "jboss.server.name", SERVER_NAME);
insertTagFromSysPropIfPresent(tags, "jboss.server.name", SERVER_NAME);
tags.put("jboss.mode", hasSystemProperty("[Standalone]") ? "standalone" : "domain");
return true;
}
return false;
}

private static boolean fillWebsphereTags(Map<String, String> tags) {
if (insertEnvIfPresent(tags, "WAS_CELL", CLUSTER_NAME)) {
insertEnvIfPresent(tags, "SERVER_NAME", SERVER_NAME);
if (insertTagFromEnvIfPresent(tags, "WAS_CELL", CLUSTER_NAME)) {
insertTagFromEnvIfPresent(tags, "SERVER_NAME", SERVER_NAME);
return true;
}
return false;
Expand Down