io.opentelemetry.javaagent.instrumentation.myfaces.MyFacesErrorCauseExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-javaagent-jsf-myfaces-1.2 Show documentation
Show all versions of opentelemetry-javaagent-jsf-myfaces-1.2 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.myfaces;
import io.opentelemetry.javaagent.instrumentation.jsf.javax.JsfErrorCauseExtractor;
import javax.el.ELException;
public class MyFacesErrorCauseExtractor extends JsfErrorCauseExtractor {
@Override
public Throwable extract(Throwable error) {
error = super.extract(error);
while (error.getCause() != null && error instanceof ELException) {
error = error.getCause();
}
return error;
}
}