diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce6fc4251..5d80dc65d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased - Use BoundedAttributes instead of raw dict to extract attributes from LogRecord and Support dropped_attributes_count in LogRecord ([#3310](https://github.com/open-telemetry/opentelemetry-python/pull/3310)) +- Add unit to view instrument selection criteria + ([#3341](https://github.com/open-telemetry/opentelemetry-python/pull/3341)) + ## Version 1.18.0/0.39b0 (2023-05-04) - Select histogram aggregation with an environment variable diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py index 82ebecbcdf..210713e7ab 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py @@ -51,6 +51,9 @@ class View: card characters should not be used with this attribute if the view has also a ``name`` defined. + instrument_unit: This is an instrument matching attribute: the unit the + instrument must have to match the view. + meter_name: This is an instrument matching attribute: the name the instrument meter must have to match the view.