diff --git a/examples/agent/startup-simulator-3000/test_setup.py b/examples/agent/startup-simulator-3000/test_setup.py index 53966931..3795e10b 100644 --- a/examples/agent/startup-simulator-3000/test_setup.py +++ b/examples/agent/startup-simulator-3000/test_setup.py @@ -14,11 +14,11 @@ def test_python_version() -> bool: """Test if Python version is compatible""" print("🐍 Testing Python version...") - version = sys.version_info - if version.major < 3 or (version.major == 3 and version.minor < 8): - print(f"❌ Python {version.major}.{version.minor} is too old. Need Python 3.8+") + py_version = sys.version_info + if py_version.major < 3 or (py_version.major == 3 and py_version.minor < 8): + print(f"❌ Python {py_version.major}.{py_version.minor} is too old. Need Python 3.8+") return False - print(f"✅ Python {version.major}.{version.minor}.{version.micro} is compatible") + print(f"✅ Python {py_version.major}.{py_version.minor}.{py_version.micro} is compatible") return True diff --git a/src/splunk_ao/experiments.py b/src/splunk_ao/experiments.py index 4f5f1c0a..37ed7393 100644 --- a/src/splunk_ao/experiments.py +++ b/src/splunk_ao/experiments.py @@ -300,8 +300,8 @@ def process_row(row: DatasetRecord, process_func: Callable) -> str: # This ensures OTEL-instrumented frameworks get dataset fields attached to their spans with splunk_ao_dataset_context(dataset_input=row.input, dataset_output=row.output, dataset_metadata=row.metadata): output = process_func(row.deserialized_input) - log = splunk_ao_context.get_logger_instance() - log.conclude(output) + logger_instance = splunk_ao_context.get_logger_instance() + logger_instance.conclude(output) except Exception as exc: output = f"error during executing: {process_func.__name__}: {exc}" _logger.error(output) diff --git a/src/splunk_ao/utils/headers_data.py b/src/splunk_ao/utils/headers_data.py index f8c6145b..64cfdcb4 100644 --- a/src/splunk_ao/utils/headers_data.py +++ b/src/splunk_ao/utils/headers_data.py @@ -59,10 +59,10 @@ def get_method_name() -> str: def get_sdk_header() -> str: """Build the Splunk-AO-SDK header value.""" - version = get_package_version() + version_str = get_package_version() method_name = get_method_name() - sdk_header = f"galileo-python/{version}" + sdk_header = f"galileo-python/{version_str}" if method_name: sdk_header = f"{sdk_header} {method_name}"