-
Notifications
You must be signed in to change notification settings - Fork 711
Inform the user of conflicting view configuration #2608
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
Conversation
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is my take on the spec wording
Try to apply the View configuration. If applying the View results in conflicting metric identities the implementation SHOULD apply the View and emit a warning.
Conflicting identities would be as described in the link; all the identifying properties of the Metric are the same (everything but description). This is distinct from the next sentence
If it is not possible to apply the View without producing semantic errors (e.g. the View sets an asynchronous instrument to use the Explicit bucket histogram aggregation) the implementation SHOULD emit a warning and proceed as if the View did not exist.
in addition to instrument/aggregation mismatches, another other semantic error would be "the presence of multiple Metric identities for a given name with the same Resource and Scope attributes.".
It's not 100% clear to me why it's specified this way, but that's my take. Wdyt?
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
e3a8734
to
c7aa3b2
Compare
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
f29b9ec
to
50e2de3
Compare
0e22309
to
6c36e35
Compare
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/_view_instrument_match.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/_view_instrument_match.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/_view_instrument_match.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/metric_reader_storage.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving in advance
opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/_view_instrument_match.py
Outdated
Show resolved
Hide resolved
…ew_instrument_match.py Co-authored-by: Aaron Abbott <[email protected]>
…ew_instrument_match.py Co-authored-by: Leighton Chen <[email protected]>
Fixes #2556