Skip to content

Commit

Permalink
Disable container id detection on z/os (#13042)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Jan 22, 2025
1 parent c16ca44 commit edbd9aa
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ private ContainerResource() {

// Visible for testing
Resource buildResource() {
// disable container id detection on z/os
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/12418
String osName = System.getProperty("os.name");
if (osName.equalsIgnoreCase("z/OS") || osName.equalsIgnoreCase("OS/390")) {
return Resource.empty();
}
return getContainerId()
.map(id -> Resource.create(Attributes.of(CONTAINER_ID, id)))
.orElseGet(Resource::empty);
Expand Down

0 comments on commit edbd9aa

Please sign in to comment.