From 29805ef1d2d48197280a138880c98263d8ce4648 Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Mon, 19 Aug 2024 11:10:35 -0600 Subject: [PATCH] WIP --- _file_configuration/noxfile.py | 6 +++--- .../opentelemetry/file_configuration/_internal/__init__.py | 3 +++ opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py | 6 +----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/_file_configuration/noxfile.py b/_file_configuration/noxfile.py index f9fe62186f7..261de9d5647 100644 --- a/_file_configuration/noxfile.py +++ b/_file_configuration/noxfile.py @@ -4,9 +4,9 @@ @session(python=["3.11"], reuse_venv=True) def test(session): session.install(".") - session.install("-r", "requirements.txt") - session.install("../opentelemetry-api") - session.install("../opentelemetry-semantic-conventions") + # session.install("-r", "requirements.txt") + # session.install("../opentelemetry-api") + # session.install("../opentelemetry-semantic-conventions") session.install("../opentelemetry-sdk") if session.posargs: diff --git a/_file_configuration/src/opentelemetry/file_configuration/_internal/__init__.py b/_file_configuration/src/opentelemetry/file_configuration/_internal/__init__.py index 8460ca72ac0..c12b8e99f1e 100644 --- a/_file_configuration/src/opentelemetry/file_configuration/_internal/__init__.py +++ b/_file_configuration/src/opentelemetry/file_configuration/_internal/__init__.py @@ -161,6 +161,9 @@ def function(probability: float) -> SometimesMondaysOnSampler: def resolve_schema(json_file_path) -> dict: + from ipdb import set_trace + set_trace() + root_path = json_file_path.absolute() with open(json_file_path, "r") as json_file: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py index ae527a3d573..5dca88d7093 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py @@ -1211,12 +1211,10 @@ def __init__( else: self._resource = resource - 1 / 0 - + self._shutdown_on_exit = shutdown_on_exit if not sampler: # sampler = sampling._get_from_env_or_default() self.sampler = 1 - self._shutdown_on_exit = self._shutdown_on_exit self.sampler = sampler self._span_limits = span_limits or SpanLimits() disabled = environ.get(OTEL_SDK_DISABLED, "") @@ -1227,8 +1225,6 @@ def __init__( self._atexit_handler = atexit.register(self.shutdown) def __repr__(self) -> str: - from ipdb import set_trace - set_trace() return ( f"{self.__class__.__name__}(" f"sampler={repr(self.sampler)},"