From 9b98bac2be99392749ffe2a02acbd6045f07093d Mon Sep 17 00:00:00 2001 From: Stephen Moore Date: Wed, 5 Feb 2025 12:28:46 +1100 Subject: [PATCH] Remove convenience code for ddtrace. This code is a bit of a distraction to the purpose of xocto and requires we be a bit too restrictive with what versions of ddtrace can co-exist with xocto --- pyproject.toml | 1 - xocto/tracing.py | 36 ------------------------------------ 2 files changed, 37 deletions(-) delete mode 100644 xocto/tracing.py diff --git a/pyproject.toml b/pyproject.toml index 5253a4e..f4f7547 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,6 @@ classifiers = [ ] license = {text = "MIT"} dependencies = [ - "ddtrace>=1.9.0,<2.20.0", "duckdb>=0.9.0", "django>=4.0", "openpyxl>=3.1.0", diff --git a/xocto/tracing.py b/xocto/tracing.py deleted file mode 100644 index 685bd1c..0000000 --- a/xocto/tracing.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import annotations - -import ddtrace - - -tracer = ddtrace.tracer -wrap = tracer.wrap - - -def set_tags(tags: dict[str | bytes, str]) -> None: - """ - Set multiple tags on the current span. - """ - span = tracer.current_span() - if span: - span.set_tags(tags) - - -def set_tag(key: str, value: object) -> None: - """ - Set a tag on the current span. - """ - span = tracer.current_span() - if span: - span.set_tag(key, value) - - -def set_global_tag(key: str, value: object) -> None: - """ - Set a tag on the current root span. - - These tags will be associated to the entire Datadog trace. - """ - span = tracer.current_root_span() - if span: - span.set_tag(key, value)