Skip to content

Commit 7dd0382

Browse files
authored
Test without PROCESS_RUNTIME_DESCRIPTION_REGEX (#832)
1 parent f0efef4 commit 7dd0382

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

tests/test_configure.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
from logfire.testing import TestExporter
6565

6666
PROCESS_RUNTIME_VERSION_REGEX = r'(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)'
67-
PROCESS_RUNTIME_DESCRIPTION_REGEX = r'(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+) \((?P<branch>\w+), (?P<month>[A-Za-z]{3})\s+(?P<day>\d{1,2}) (?P<year>\d{4}), (?P<hour>\d{2}):(?P<minute>\d{2}):(?P<second>\d{2})\)\s*\[\w+ (?P<clang_version>[\d.]+)\s*\]'
6867

6968

7069
def test_propagate_config_to_tags(exporter: TestExporter) -> None:
@@ -679,7 +678,7 @@ def test_otel_service_name_env_var(config_kwargs: dict[str, Any], exporter: Test
679678
'service.instance.id': '00000000000000000000000000000000',
680679
'process.runtime.name': 'cpython',
681680
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
682-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
681+
'process.runtime.description': sys.version,
683682
'process.pid': 1234,
684683
}
685684
},
@@ -725,7 +724,7 @@ def test_otel_otel_resource_attributes_env_var(config_kwargs: dict[str, Any], ex
725724
'process.pid': 1234,
726725
'process.runtime.name': 'cpython',
727726
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
728-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
727+
'process.runtime.description': sys.version,
729728
}
730729
},
731730
}
@@ -772,7 +771,7 @@ def test_otel_service_name_has_priority_on_otel_resource_attributes_service_name
772771
'process.pid': 1234,
773772
'process.runtime.name': 'cpython',
774773
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
775-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
774+
'process.runtime.description': sys.version,
776775
}
777776
},
778777
}
@@ -1673,7 +1672,7 @@ def test_environment(config_kwargs: dict[str, Any], exporter: TestExporter):
16731672
'process.pid': 1234,
16741673
'process.runtime.name': 'cpython',
16751674
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
1676-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
1675+
'process.runtime.description': sys.version,
16771676
'service.version': '1.2.3',
16781677
'deployment.environment.name': 'production',
16791678
}
@@ -1723,7 +1722,7 @@ def test_code_source(config_kwargs: dict[str, Any], exporter: TestExporter):
17231722
'process.pid': 1234,
17241723
'process.runtime.name': 'cpython',
17251724
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
1726-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
1725+
'process.runtime.description': sys.version,
17271726
'logfire.code.root_path': 'logfire',
17281727
'logfire.code.work_dir': os.getcwd(),
17291728
'vcs.repository.url.full': 'https://github.com/pydantic/logfire',
@@ -1775,7 +1774,7 @@ def test_code_source_without_root_path(config_kwargs: dict[str, Any], exporter:
17751774
'process.pid': 1234,
17761775
'process.runtime.name': 'cpython',
17771776
'process.runtime.version': IsStr(regex=PROCESS_RUNTIME_VERSION_REGEX),
1778-
'process.runtime.description': IsStr(regex=PROCESS_RUNTIME_DESCRIPTION_REGEX),
1777+
'process.runtime.description': sys.version,
17791778
'logfire.code.work_dir': os.getcwd(),
17801779
'vcs.repository.url.full': 'https://github.com/pydantic/logfire',
17811780
'vcs.repository.ref.revision': 'main',

0 commit comments

Comments
 (0)