tumbi-assembler/pungi
Lubomír Sedlář d3630bfa6f Record exceptions for top level OTel span
If there is an exception in the code, the cli_main function captures it,
saves the traceback and exits the process.

With the original tracing span, the instrumentation never saw the actual
exception, only SystemExit. This meant the span was not recorded as
failed. (Technically python-opentelemetry 1.31.0 does record it, but
that change was reverted in 1.32.0.)

It is somewhat tricky to structure the code so that the exception is
recorded implicitly. The status update to DOOMED must happen inside the
span (in order to propagate it to the trace). Thus a new function is
exported from the tracing module to record the exception explicitly
before it gets discarded and replaced with the exit.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2025-05-13 11:03:52 +02:00
..
compose_metadata Format code base with black 2020-02-05 17:35:47 +08:00
ostree Protect against decoding errors with subprocess text mode 2025-01-16 09:20:27 +01:00
phases Drop compatibility with Koji < 1.32 2025-04-28 12:49:02 +02:00
scripts Record exceptions for top level OTel span 2025-05-13 11:03:52 +02:00
wrappers Drop compatibility with Koji < 1.32 2025-04-28 12:49:02 +02:00
__init__.py Protect against decoding errors with subprocess text mode 2025-01-16 09:20:27 +01:00
arch.py Format code base with black 2020-02-05 17:35:47 +08:00
arch_utils.py Format code 2021-03-02 18:31:45 +08:00
checks.py kiwibuild: Add support for use_buildroot_repo option 2025-04-22 13:29:43 +02:00
common.py Format code base with black 2020-02-05 17:35:47 +08:00
compose.py Add basic telemetry support 2025-03-17 10:58:40 +01:00
createiso.py Drop usage of six 2024-11-29 09:29:20 +01:00
dnf_wrapper.py Format code base with black 2020-02-05 17:35:47 +08:00
errors.py Move UnsignedPackagesError to a separate file 2021-02-08 10:16:32 +00:00
gather_dnf.py Remove pungi/gather.py and associated code 2024-11-19 14:23:15 +01:00
graph.py Format code 2021-03-02 18:31:45 +08:00
ks.py Format code base with black 2020-02-05 17:35:47 +08:00
linker.py Hardlink or copy scratch builds always 2020-08-07 18:00:19 +08:00
media_split.py Fix black complaint 2022-08-10 09:04:41 +02:00
metadata.py Remove useless debug message 2023-05-30 15:46:17 +02:00
module_util.py Fix module defaults and obsoletes validation 2022-06-10 11:35:26 +00:00
multilib_dnf.py Format code base with black 2020-02-05 17:35:47 +08:00
notifier.py Protect against decoding errors with subprocess text mode 2025-01-16 09:20:27 +01:00
otel.py Record exceptions for top level OTel span 2025-05-13 11:03:52 +02:00
paths.py Add module obsoletes feature 2022-01-12 12:51:37 +01:00
profiler.py profiler: Flush stdout before printing 2022-08-29 05:57:14 +00:00
runroot.py Move temporary buildinstall download to work/ 2025-01-23 10:00:41 +01:00
threading.py Add basic telemetry support 2025-03-17 10:58:40 +01:00
util.py util: Fix typo in regex for container digests 2025-04-03 10:05:32 +02:00