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

Clarify identical instrument definition for SDK. #3585

Merged
merged 4 commits into from
Jul 12, 2023

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Jul 6, 2023

Currently, the SDK states that identical instruments need to have their data aggregated together. It is implied that the definition of "identical" is defined by the metric data-model. However, the linked data-model defines identical in a way that does not include the Instrument number type. Therefore, if two instruments are "identical" in all their fields, but one if defined for double-precision floating point values and the other integer values they will need to be aggregated together. This is challenging if not impossible for strongly typed implementations.

Instead, have the SDK explicitly use the definition added to the metric API defining the number type (and all other language-level features) as identifying and therefore included in the definition of identical.

This does mean that the issue of unifying instruments that differ only by the number type of the data values is left for downstream (e.g. exporter, collector) elements to handle.

Currently, the SDK states that identical instruments need to have their
data aggregated together. It is implied that the definition of
"identical" is defined by the metric data-model. However, the linked
data-model defines identical in a way that does not include the
Instrument number type. Therefore, if two instruments are "identical" in
all their fields, but one if defined for double-precision floating point
values and the other integer values they will need to be aggregated
together. This is challenging if not impossible for strongly typed
implementations.

Instead, have the SDK explicitly use the definition added to the metric
API defining the number type (and all other Language-level features) as
identifying and therefore included in the definition of identical.
@MrAlias MrAlias added area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory labels Jul 6, 2023
@MrAlias MrAlias requested review from a team July 6, 2023 20:29
Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please add a changelog entry.

@reyang reyang merged commit cfd8b9c into open-telemetry:main Jul 12, 2023
@MrAlias MrAlias deleted the identical-inst branch July 12, 2023 17:21
yurishkuro added a commit that referenced this pull request Jul 18, 2023
## Changes

Looking at #3585, I found a typo. While looking through the page I found
a few more.

Co-authored-by: Yuri Shkuro <[email protected]>
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
## Changes

Looking at open-telemetry#3585, I found a typo. While looking through the page I found
a few more.

Co-authored-by: Yuri Shkuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk Related to the SDK spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants