Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions examples/extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {
id "com.gradleup.shadow" version "8.3.6"
id "com.diffplug.spotless" version "7.0.3"

id "io.opentelemetry.instrumentation.muzzle-generation" version "2.17.0-alpha-SNAPSHOT"
id "io.opentelemetry.instrumentation.muzzle-check" version "2.17.0-alpha-SNAPSHOT"
id "io.opentelemetry.instrumentation.muzzle-generation" version "2.17.0-alpha"
id "io.opentelemetry.instrumentation.muzzle-check" version "2.17.0-alpha"
}

group 'io.opentelemetry.example'
Expand All @@ -29,8 +29,8 @@ ext {
opentelemetrySdk : "1.50.0",

// these lines are managed by .github/scripts/update-version.sh
opentelemetryJavaagent : "2.17.0-SNAPSHOT",
opentelemetryJavaagentAlpha: "2.17.0-alpha-SNAPSHOT"
opentelemetryJavaagent : "2.17.0",
opentelemetryJavaagentAlpha: "2.17.0-alpha"
]

deps = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,23 @@ public boolean isHealthy() {
logHealthCheckResult(isHealthy);
return isHealthy;
} catch (IOException e) {
String mwTarget = EnvironmentConfig.getMwTarget();

if (mwTarget == null || mwTarget.trim().isEmpty()) {
LOGGER.log(
Level.WARNING,
"Health check failed due to I/O error. No monitoring agent detected and target URL is not configured. "
+ "Instrumentation will continue but functionality may be degraded. Please verify network connectivity "
+ "and monitoring configuration.",
e);
return false;
} else {
return true;
}
} catch (Exception e) {
LOGGER.log(
Level.WARNING,
"Error performing health check. Instrumentation will continue, but may not function correctly.",
Level.SEVERE,
"Unexpected error during health check. Instrumentation status unknown and may be unreliable.",
e);
return false;
}
Expand Down Expand Up @@ -68,7 +82,7 @@ private boolean performHealthCheck() throws IOException {
public void logHealthCheckResult(boolean isHealthy) {
if (isHealthy) {
LOGGER.info("Health check passed. Proceeding with instrumentation.");
} else {
} else if (EnvironmentConfig.getMwTarget() == "") {
LOGGER.log(
Level.WARNING,
"MW Agent Healthcheck is failing ... This could be due to incorrect value of MW_AGENT_SERVICE\n"
Expand Down