|
64 | 64 | from logfire.testing import TestExporter |
65 | 65 |
|
66 | 66 | 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*\]' |
68 | 67 |
|
69 | 68 |
|
70 | 69 | 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 |
679 | 678 | 'service.instance.id': '00000000000000000000000000000000', |
680 | 679 | 'process.runtime.name': 'cpython', |
681 | 680 | '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, |
683 | 682 | 'process.pid': 1234, |
684 | 683 | } |
685 | 684 | }, |
@@ -725,7 +724,7 @@ def test_otel_otel_resource_attributes_env_var(config_kwargs: dict[str, Any], ex |
725 | 724 | 'process.pid': 1234, |
726 | 725 | 'process.runtime.name': 'cpython', |
727 | 726 | '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, |
729 | 728 | } |
730 | 729 | }, |
731 | 730 | } |
@@ -772,7 +771,7 @@ def test_otel_service_name_has_priority_on_otel_resource_attributes_service_name |
772 | 771 | 'process.pid': 1234, |
773 | 772 | 'process.runtime.name': 'cpython', |
774 | 773 | '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, |
776 | 775 | } |
777 | 776 | }, |
778 | 777 | } |
@@ -1673,7 +1672,7 @@ def test_environment(config_kwargs: dict[str, Any], exporter: TestExporter): |
1673 | 1672 | 'process.pid': 1234, |
1674 | 1673 | 'process.runtime.name': 'cpython', |
1675 | 1674 | '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, |
1677 | 1676 | 'service.version': '1.2.3', |
1678 | 1677 | 'deployment.environment.name': 'production', |
1679 | 1678 | } |
@@ -1723,7 +1722,7 @@ def test_code_source(config_kwargs: dict[str, Any], exporter: TestExporter): |
1723 | 1722 | 'process.pid': 1234, |
1724 | 1723 | 'process.runtime.name': 'cpython', |
1725 | 1724 | '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, |
1727 | 1726 | 'logfire.code.root_path': 'logfire', |
1728 | 1727 | 'logfire.code.work_dir': os.getcwd(), |
1729 | 1728 | '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: |
1775 | 1774 | 'process.pid': 1234, |
1776 | 1775 | 'process.runtime.name': 'cpython', |
1777 | 1776 | '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, |
1779 | 1778 | 'logfire.code.work_dir': os.getcwd(), |
1780 | 1779 | 'vcs.repository.url.full': 'https://github.com/pydantic/logfire', |
1781 | 1780 | 'vcs.repository.ref.revision': 'main', |
|
0 commit comments