From 8c791b994f4dc6eb34038f6e1a2b0641d6d8ec18 Mon Sep 17 00:00:00 2001 From: Fabien Crespel Date: Wed, 21 Sep 2022 23:39:04 +0200 Subject: [PATCH] Fix directory separator in ProcessResource attributes --- .../instrumentation/resources/ProcessResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java b/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java index a1e881fe3575..4d2700555a3a 100644 --- a/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java +++ b/instrumentation/resources/library/src/main/java/io/opentelemetry/instrumentation/resources/ProcessResource.java @@ -61,9 +61,9 @@ private static Resource doBuildResource() { if (javaHome != null) { StringBuilder executablePath = new StringBuilder(javaHome); executablePath - .append(File.pathSeparatorChar) + .append(File.separatorChar) .append("bin") - .append(File.pathSeparatorChar) + .append(File.separatorChar) .append("java"); if (osName != null && osName.toLowerCase().startsWith("windows")) { executablePath.append(".exe");