io.opentelemetry.javaagent.extension.matcher.Utils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-javaagent-extension-api Show documentation
Show all versions of opentelemetry-javaagent-extension-api Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.extension.matcher;
import net.bytebuddy.description.type.TypeDefinition;
final class Utils {
static String safeTypeDefinitionName(TypeDefinition td) {
try {
return td.getTypeName();
} catch (IllegalStateException ex) {
String message = ex.getMessage();
if (message.startsWith("Cannot resolve type description for ")) {
return message.replace("Cannot resolve type description for ", "");
} else {
return "?";
}
}
}
private Utils() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy