-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop collecting package versions (#387)
- Loading branch information
1 parent
fe12714
commit 181640f
Showing
2 changed files
with
7 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
import json | ||
|
||
from dirty_equals import IsPartialDict | ||
|
||
from logfire import VERSION, info | ||
from logfire.testing import TestExporter | ||
|
||
|
||
def test_collect_resources(exporter: TestExporter) -> None: | ||
info('test') | ||
|
||
resources = [ | ||
span['resource'] | ||
for span in exporter.exported_spans_as_dict(include_resources=True, include_package_versions=True) | ||
] | ||
from logfire import VERSION | ||
from logfire._internal.collect_system_info import collect_package_info | ||
|
||
assert len(resources) == 1 | ||
resource = resources[0] | ||
data = json.loads(resource['attributes']['logfire.package_versions']) | ||
|
||
assert data == IsPartialDict({'logfire': VERSION}) | ||
def test_collect_package_info() -> None: | ||
assert collect_package_info() == IsPartialDict({'logfire': VERSION}) |