# # spec file for package opencensus-java # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: opencensus-java Version: 0.31.1 Release: 0 Summary: OpenCensus - A stats collection and distributed tracing framework License: Apache-2.0 Group: Productivity/Networking/Web/Servers URL: https://github.com/census-instrumentation/opencensus-java Source0: https://github.com/census-instrumentation/opencensus-java/archive/refs/tags/v%{version}.tar.gz Source1: https://repo1.maven.org/maven2/io/opencensus/opencensus-api/%{version}/opencensus-api-%{version}.pom Source2: https://repo1.maven.org/maven2/io/opencensus/opencensus-impl/%{version}/opencensus-impl-%{version}.pom Source3: https://repo1.maven.org/maven2/io/opencensus/opencensus-impl-core/%{version}/opencensus-impl-core-%{version}.pom Source4: https://repo1.maven.org/maven2/io/opencensus/opencensus-impl-lite/%{version}/opencensus-impl-lite-%{version}.pom Source5: https://repo1.maven.org/maven2/io/opencensus/opencensus-testing/%{version}/opencensus-testing-%{version}.pom Source6: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-exemplar-util/%{version}/opencensus-contrib-exemplar-util-%{version}.pom Source7: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-grpc-metrics/%{version}/opencensus-contrib-grpc-metrics-%{version}.pom Source8: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-grpc-util/%{version}/opencensus-contrib-grpc-util-%{version}.pom Source9: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-http-jaxrs/%{version}/opencensus-contrib-http-jaxrs-%{version}.pom Source10: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-http-jetty-client/%{version}/opencensus-contrib-http-jetty-client-%{version}.pom Source11: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-http-servlet/%{version}/opencensus-contrib-http-servlet-%{version}.pom Source12: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-http-util/%{version}/opencensus-contrib-http-util-%{version}.pom Source13: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-log-correlation-log4j2/%{version}/opencensus-contrib-log-correlation-log4j2-%{version}.pom Source14: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-resource-util/%{version}/opencensus-contrib-resource-util-%{version}.pom Source15: https://repo1.maven.org/maven2/io/opencensus/opencensus-contrib-zpages/0.31.1/opencensus-contrib-zpages-0.31.1.pom Source16: https://repo1.maven.org/maven2/io/opencensus/opencensus-exporter-metrics-util/%{version}/opencensus-exporter-metrics-util-%{version}.pom Source17: https://repo1.maven.org/maven2/io/opencensus/opencensus-exporter-stats-prometheus/%{version}/opencensus-exporter-stats-prometheus-%{version}.pom Source18: https://repo1.maven.org/maven2/io/opencensus/opencensus-exporter-trace-util/%{version}/opencensus-exporter-trace-util-%{version}.pom Source100: aggregator.pom Patch0: Collector-Type-UNTYPED-is-UNKNOWN.patch BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(com.google.auto.value:auto-value) BuildRequires: mvn(com.google.auto.value:auto-value-annotations) BuildRequires: mvn(com.google.code.findbugs:jsr305) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.lmax:disruptor) BuildRequires: mvn(io.grpc:grpc-context) BuildRequires: mvn(io.grpc:grpc-core) BuildRequires: mvn(io.prometheus:simpleclient) BuildRequires: mvn(javax.annotation:javax.annotation-api) BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(javax.ws.rs:javax.ws.rs-api) BuildRequires: mvn(org.apache.logging.log4j:log4j-core) BuildRequires: mvn(org.eclipse.jetty:jetty-client) BuildArch: noarch %description OpenCensus is a toolkit for collecting application performance and behavior data. It currently includes 3 apis: stats, tracing and tags. %package api Summary: OpenCensus API Group: Productivity/Networking/Web/Servers %description api OpenCensus API * Java 6 and Android compatible. * The abstract classes in this directory can be subclassed to create alternative implementations of the OpenCensus library. %package contrib-exemplar-util Summary: OpenCensus Exemplar Util Group: Productivity/Networking/Web/Servers %description contrib-exemplar-util The OpenCensus Exemplar Util for Java is a collection of utilities for recording Exemplars for OpenCensus stats. %package contrib-grpc-metrics Summary: OpenCensus gRPC Metrics Group: Productivity/Networking/Web/Servers %description contrib-grpc-metrics OpenCensus gRPC Metrics. RPC measure and view constants used by gRPC. %package contrib-grpc-util Summary: OpenCensus gRPC Util Group: Productivity/Networking/Web/Servers %description contrib-grpc-util The OpenCensus gRPC Util for Java is a collection of utilities for trace instrumentation when working with gRPC. %package contrib-http-jaxrs Summary: OpenCensus JAX-RS Plugin Group: Productivity/Networking/Web/Servers %description contrib-http-jaxrs The OpenCensus JAX-RS for Java is a container and client filter for trace instrumentation when using JAX-RS for REST implementation in Java. %package contrib-http-jetty-client Summary: OpenCensus Http Jetty Client Plugin Group: Productivity/Networking/Web/Servers %description contrib-http-jetty-client The OpenCensus Jetty HttpClient for Java is a wrapper for trace instrumentation when using Jetty as HTTP client. %package contrib-http-servlet Summary: OpenCensus Http Servlet Plugin Group: Productivity/Networking/Web/Servers %description contrib-http-servlet The OpenCensus Http Servlet Plugin for Java is a plugin for trace instrumentation when using HTTP Servlet 3.0 %package contrib-http-util Summary: OpenCensus HTTP Util Group: Productivity/Networking/Web/Servers %description contrib-http-util The OpenCensus HTTP Util for Java is a collection of utilities for trace instrumentation when working with HTTP. %package contrib-log-correlation-log4j2 Summary: OpenCensus Log4j 2 Log Correlation Group: Productivity/Networking/Web/Servers %description contrib-log-correlation-log4j2 The 'opencensus-contrib-log-correlation-log4j2' artifact provides a Log4j 2 'ContextDataInjector' that automatically adds tracing data to the context of Log4j 'LogEvent's. The class name is'OpenCensusTraceContextDataInjector'. 'OpenCensusTraceContextDataInjector' adds the current trace ID, span ID, and sampling decision to each 'LogEvent', so that they can be accessed with 'LogEvent.getContextData()' or included in a layout. %package contrib-resource-util Summary: OpenCensus Resource Util Group: Productivity/Networking/Web/Servers %description contrib-resource-util The OpenCensus Resource Util for Java is a collection of utilities that defines a set of common resources (aws_ec2_instance, gcp_gce_instance, k8s_container, etc.) and offers auto detection for some of the resources, based on the environment where the application is running. %package contrib-zpages Summary: OpenCensus Z-Pages Group: Productivity/Networking/Web/Servers %description contrib-zpages The OpenCensus Z-Pages for Java is a collection of HTML pages to display stats and trace data and allows library configuration control. %package exporter-metrics-util Summary: OpenCensus Java Metrics Exporter Utils Group: Productivity/Networking/Web/Servers %description exporter-metrics-util The OpenCensus Metrics Exporter Util is the Java helper package for all metrics exporters. %package exporter-stats-prometheus Summary: OpenCensus Stats Prometheus Exporter Group: Productivity/Networking/Web/Servers %description exporter-stats-prometheus The OpenCensus Prometheus Stats Exporter is a stats exporter that exports data to Prometheus. Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. %package exporter-trace-util Summary: OpenCensus Java Trace Exporter Utils Group: Productivity/Networking/Web/Servers %description exporter-trace-util The OpenCensus Trace Exporter Util is the Java helper package for all trace exporters. %package impl Summary: OpenCensus Implementation Group: Productivity/Networking/Web/Servers %description impl OpenCensus Implementation. * Java 7 compatible. * Contains any classes not compatible with Android. %package impl-core Summary: OpenCensus Core Implementation Group: Productivity/Networking/Web/Servers %description impl-core OpenCensus implementation. * The main implementation shared between Java and Android. * Java 7 and Android compatible. %package impl-lite Summary: OpenCensus Lite Implementation Group: Productivity/Networking/Web/Servers %description impl-lite OpenCensus Android implementation. * Android compatible. * StatsManager specifies the stats implementation classes that should be used with Android. %package testing Summary: OpenCensus Testing Group: Productivity/Networking/Web/Servers %description testing OpenCensus Testing Package. * Java 6 and Android compatible. * The classes in this directory can be used to test the API integration. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %setup -q cp %{SOURCE100} pom.xml cp %{SOURCE1} api/pom.xml cp %{SOURCE2} impl/pom.xml cp %{SOURCE3} impl_core/pom.xml cp %{SOURCE4} impl_lite/pom.xml cp %{SOURCE5} testing/pom.xml cp %{SOURCE6} contrib/exemplar_util/pom.xml cp %{SOURCE7} contrib/grpc_metrics/pom.xml cp %{SOURCE8} contrib/grpc_util/pom.xml cp %{SOURCE9} contrib/http_jaxrs/pom.xml cp %{SOURCE10} contrib/http_jetty_client/pom.xml cp %{SOURCE11} contrib/http_servlet/pom.xml cp %{SOURCE12} contrib/http_util/pom.xml cp %{SOURCE13} contrib/log_correlation/log4j2/pom.xml cp %{SOURCE14} contrib/resource_util/pom.xml cp %{SOURCE15} contrib/zpages/pom.xml cp %{SOURCE16} exporters/metrics/util/pom.xml cp %{SOURCE17} exporters/stats/prometheus/pom.xml cp %{SOURCE18} exporters/trace/util/pom.xml %patch -P 0 -p1 for i in api impl_core contrib/exemplar_util exporters/metrics/util exporters/stats/prometheus; do %pom_add_dep com.google.auto.value:auto-value-annotations:1.11.0:provided $i %pom_add_dep com.google.auto.value:auto-value:1.11.0:provided $i done %pom_change_dep :javax.ws.rs-api :::provided contrib/http_jaxrs %pom_change_dep :javax.annotation-api :::provided contrib/http_jaxrs %pom_change_dep :log4j-core :::provided contrib/log_correlation/log4j2 for i in api impl impl_core testing contrib/exemplar_util contrib/http_jaxrs \ contrib/http_jetty_client contrib/http_servlet contrib/http_util \ contrib/log_correlation/log4j2 contrib/zpages exporters/metrics/util \ exporters/stats/prometheus; do %pom_add_dep com.google.code.findbugs:jsr305:3.0.2:provided $i done %{mvn_package} :aggregator __noinstall %build %{mvn_build} -s -f -- \ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} -Dmaven.compiler.release=8 \ %endif -Dsource=8 %install %mvn_install %fdupes -s %{buildroot}%{_javadocdir} %files api -f .mfiles-opencensus-api %license LICENSE %doc README.md %files contrib-exemplar-util -f .mfiles-opencensus-contrib-exemplar-util %files contrib-grpc-metrics -f .mfiles-opencensus-contrib-grpc-metrics %files contrib-grpc-util -f .mfiles-opencensus-contrib-grpc-util %files contrib-http-jaxrs -f .mfiles-opencensus-contrib-http-jaxrs %files contrib-http-jetty-client -f .mfiles-opencensus-contrib-http-jetty-client %files contrib-http-servlet -f .mfiles-opencensus-contrib-http-servlet %files contrib-http-util -f .mfiles-opencensus-contrib-http-util %files contrib-log-correlation-log4j2 -f .mfiles-opencensus-contrib-log-correlation-log4j2 %files contrib-resource-util -f .mfiles-opencensus-contrib-resource-util %files contrib-zpages -f .mfiles-opencensus-contrib-zpages %files exporter-metrics-util -f .mfiles-opencensus-exporter-metrics-util %files exporter-stats-prometheus -f .mfiles-opencensus-exporter-stats-prometheus %files exporter-trace-util -f .mfiles-opencensus-exporter-trace-util %files impl -f .mfiles-opencensus-impl %files impl-core -f .mfiles-opencensus-impl-core %files impl-lite -f .mfiles-opencensus-impl-lite %files testing -f .mfiles-opencensus-testing %files javadoc -f .mfiles-javadoc %license LICENSE %changelog