io.opentelemetry.javaagent.instrumentation.mojarra.v3_0.MojarraSingletons Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-javaagent-jsf-mojarra-3.0 Show documentation
Show all versions of opentelemetry-javaagent-jsf-mojarra-3.0 Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.mojarra.v3_0;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;
import io.opentelemetry.javaagent.instrumentation.jsf.jakarta.JsfErrorCauseExtractor;
import io.opentelemetry.javaagent.instrumentation.jsf.jakarta.JsfRequest;
public class MojarraSingletons {
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jsf-mojarra-3.0";
private static final Instrumenter INSTRUMENTER;
static {
INSTRUMENTER =
Instrumenter.builder(
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, JsfRequest::spanName)
.setErrorCauseExtractor(new JsfErrorCauseExtractor())
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
.buildInstrumenter();
}
public static Instrumenter instrumenter() {
return INSTRUMENTER;
}
private MojarraSingletons() {}
}