Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
prometheus-simpleclient-java
remove_opentelemetry_tracer.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File remove_opentelemetry_tracer.patch of Package prometheus-simpleclient-java
diff --git a/client_java-parent-0.12.0/simpleclient/src/main/java/io/prometheus/client/exemplars/Tracer.java b/client_java-parent-0.12.0/simpleclient/src/main/java/io/prometheus/client/exemplars/Tracer.java index 97ec4f4..0686268 100644 --- a/client_java-parent-0.12.0/simpleclient/src/main/java/io/prometheus/client/exemplars/Tracer.java +++ b/client_java-parent-0.12.0/simpleclient/src/main/java/io/prometheus/client/exemplars/Tracer.java @@ -1,44 +1,14 @@ package io.prometheus.client.exemplars; -import io.prometheus.client.exemplars.tracer.common.SpanContextSupplier; -import io.prometheus.client.exemplars.tracer.otel.OpenTelemetrySpanContextSupplier; -import io.prometheus.client.exemplars.tracer.otel_agent.OpenTelemetryAgentSpanContextSupplier; - class Tracer { ExemplarSampler initExemplarSampler() { - try { - Object spanContextSupplier = findSpanContextSupplier(); - if (spanContextSupplier != null) { - return new DefaultExemplarSampler((SpanContextSupplier) spanContextSupplier); - } - } catch (NoClassDefFoundError ignored) { - // simpleclient_tracer_common dependency not found - } return null; } // Avoid SpanContextSupplier in the method signature so that we can handle the NoClassDefFoundError // even if the user excluded simpleclient_tracer_common from the classpath. private Object findSpanContextSupplier() { - try { - if (OpenTelemetrySpanContextSupplier.isAvailable()) { - return new OpenTelemetrySpanContextSupplier(); - } - } catch (NoClassDefFoundError ignored) { - // tracer_otel dependency not found - } catch (UnsupportedClassVersionError ignored) { - // OpenTelemetry requires Java 8, but client_java might run on Java 6. - } - try { - if (OpenTelemetryAgentSpanContextSupplier.isAvailable()) { - return new OpenTelemetryAgentSpanContextSupplier(); - } - } catch (NoClassDefFoundError ignored) { - // tracer_otel_agent dependency not found - } catch (UnsupportedClassVersionError ignored) { - // OpenTelemetry requires Java 8, but client_java might run on Java 6. - } return null; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor