Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics to the context of non-scoped codegen #270

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
black
lmolkova committed Feb 19, 2024
commit 5e5a616d5dd37f45ac5eda3ef51a31781e318606
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ def get_data_single_file(
"attributes": semconvset.attributes(),
"attribute_templates": semconvset.attribute_templates(),
"attributes_and_templates": self._grouped_attribute_definitions(semconvset),
"metrics": self._all_metrics_definitions(semconvset) or []
"metrics": self._all_metrics_definitions(semconvset) or [],
}
data.update(self.parameters)
return data
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ def test_codegen_units(test_file_path, read_test_file):

assert result == expected


def test_codegen_metrics_all(test_file_path, read_test_file):
semconv = SemanticConventionSet(debug=False)
semconv.parse(test_file_path("yaml", "metrics", "metrics.yaml"))
@@ -39,6 +40,7 @@ def test_codegen_metrics_all(test_file_path, read_test_file):

assert result == expected


def test_strip_blocks_enabled(test_file_path, read_test_file):
"""Tests that the Jinja whitespace control params are fed to the Jinja environment"""
semconv = SemanticConventionSet(debug=False)