diff --git a/inspectit-gepard-agent/src/main/java/rocks/inspectit/gepard/agent/instrumentation/hook/action/span/SpanAction.java b/inspectit-gepard-agent/src/main/java/rocks/inspectit/gepard/agent/instrumentation/hook/action/span/SpanAction.java index 09d0bff..681a0c4 100644 --- a/inspectit-gepard-agent/src/main/java/rocks/inspectit/gepard/agent/instrumentation/hook/action/span/SpanAction.java +++ b/inspectit-gepard-agent/src/main/java/rocks/inspectit/gepard/agent/instrumentation/hook/action/span/SpanAction.java @@ -27,7 +27,13 @@ public class SpanAction { */ public Optional startSpan(MethodExecutionContext executionContext) { String spanName = getSpanName(executionContext); - Attributes methodAttributes = SpanUtil.createMethodAttributes(executionContext); + Attributes methodAttributes; + try { + methodAttributes = SpanUtil.createMethodAttributes(executionContext); + } catch (Exception e) { + log.warn("Failed to read method attributes: {}", e.getMessage()); + methodAttributes = Attributes.empty(); + } // Use the OTel span if (SpanUtil.spanAlreadyExists(spanName)) {