File perl-OpenTelemetry.spec of Package perl-OpenTelemetry
#
# spec file for package perl-OpenTelemetry
#
# Copyright (c) 2025 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/
#
%define cpan_name OpenTelemetry
Name: perl-OpenTelemetry
Version: 0.031
Release: 0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Perl implementation of the OpenTelemetry standard
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JJ/JJATRIA/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Bytes::Random::Secure)
BuildRequires: perl(Carp::Clan)
BuildRequires: perl(Class::Inspector)
BuildRequires: perl(Class::Method::Modifiers)
BuildRequires: perl(Exporter::Tiny) >= 0.044
BuildRequires: perl(Feature::Compat::Defer)
BuildRequires: perl(Feature::Compat::Try) >= 0.05
BuildRequires: perl(Future) >= 0.26
BuildRequires: perl(Future::AsyncAwait)
BuildRequires: perl(List::Util) >= 1.45
BuildRequires: perl(Log::Any)
BuildRequires: perl(Metrics::Any)
BuildRequires: perl(Module::Build::Tiny) >= 0.034
BuildRequires: perl(Module::Pluggable)
BuildRequires: perl(Module::Runtime)
BuildRequires: perl(Mutex)
BuildRequires: perl(Object::Pad) >= 0.74
BuildRequires: perl(Ref::Util)
BuildRequires: perl(Sentinel)
BuildRequires: perl(Syntax::Keyword::Dynamically)
BuildRequires: perl(Test2::V0)
BuildRequires: perl(URI)
BuildRequires: perl(URL::Encode)
BuildRequires: perl(UUID::URandom)
BuildRequires: perl(X::Tiny)
BuildRequires: perl(isa)
Requires: perl(Bytes::Random::Secure)
Requires: perl(Carp::Clan)
Requires: perl(Class::Method::Modifiers)
Requires: perl(Exporter::Tiny) >= 0.044
Requires: perl(Feature::Compat::Defer)
Requires: perl(Feature::Compat::Try) >= 0.05
Requires: perl(Future) >= 0.26
Requires: perl(Future::AsyncAwait)
Requires: perl(List::Util) >= 1.45
Requires: perl(Log::Any)
Requires: perl(Module::Pluggable)
Requires: perl(Module::Runtime)
Requires: perl(Mutex)
Requires: perl(Object::Pad) >= 0.74
Requires: perl(Ref::Util)
Requires: perl(Sentinel)
Requires: perl(Syntax::Keyword::Dynamically)
Requires: perl(URI)
Requires: perl(URL::Encode)
Requires: perl(UUID::URandom)
Requires: perl(X::Tiny)
Requires: perl(isa)
%{perl_requires}
%description
The OpenTelemetry distribution is the Perl implementation of at
https://opentelemetry.io. This module provides an entrypoint and exposes
exposes an interface to get and set components that need to be globally
available.
The OpenTelemetry standard keeps a strict separation between an API layer
that implements an interface that is backend-agnostic, and an SDK layer
that can be connected to the API to do the actual work.
The modules in this distribution implement the OpenTelemetry API, and as
such can be used to instrument code so it generates data about its
performance and operation. As long as no SDK is used, these data will not
be processed in any way, or transmitted anywhere.
See OpenTelemetry::SDK for the reference implementation of the
OpenTelemetry SDK for more details about how it can be configured to make
use of the data generated by uses of this API.
The OpenTelemetry module offers two main interfaces: functions can be
called as class methods, in which case nothing needs to be imported; or
they can be imported into your namespace for a functional interface (in
which case the functions will have a 'otel_' prefix; see more details
below).
In both cases, functions that expose a component that can be set will be
lvalue functions, which can be used in regular assignments. Note, however,
that these assignments will be globally visible. For local definitions,
consider using Syntax::Keyword::Dynamically, or other similar methods.
%prep
%autosetup -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc Changes examples README.md
%license LICENSE
%changelog