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

[bugFix] Meter tags are now recognized as identifiers #5982

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dulikvor
Copy link

@dulikvor dulikvor commented Nov 16, 2024

Fixes #5859
Design discussion issue #

Changes

Metric tags are now considered identifiers, contributing to metric scope uniqueness.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@dulikvor dulikvor requested a review from a team as a code owner November 16, 2024 13:13
Copy link

linux-foundation-easycla bot commented Nov 16, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Nov 16, 2024
@dulikvor dulikvor force-pushed the users/dulikvor/markinstrumentation branch from 2458d0b to b5d1011 Compare November 16, 2024 16:51
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.23%. Comparing base (b9be07a) to head (56f4776).
Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5982      +/-   ##
==========================================
+ Coverage   86.11%   86.23%   +0.11%     
==========================================
  Files         257      257              
  Lines       11690    11688       -2     
==========================================
+ Hits        10067    10079      +12     
+ Misses       1623     1609      -14     
Flag Coverage Δ
unittests-Project-Experimental 86.21% <100.00%> (+0.14%) ⬆️
unittests-Project-Stable 86.12% <100.00%> (+0.37%) ⬆️
unittests-Solution ?
unittests-UnstableCoreLibraries-Experimental ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/OpenTelemetry/Metrics/Metric.cs 97.24% <100.00%> (ø)
src/OpenTelemetry/Metrics/MetricStreamIdentity.cs 89.25% <100.00%> (+0.27%) ⬆️

... and 11 files with indirect coverage changes

Copy link
Contributor

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Nov 26, 2024
Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

Thanks!
Please add changelog entry too, as this is breaking existing behavior to fix bug.

@github-actions github-actions bot removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Nov 27, 2024
@cijothomas cijothomas added the spec-compliance Issues related to compliance with the OpenTelemetry Specification label Dec 4, 2024
@@ -6,6 +6,10 @@ Notes](../../RELEASENOTES.md).

## Unreleased

* Updated `OpenTelemetry.Metrics.MetricStreamIdentity` Metric tags are now considered identifiers,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Updated `OpenTelemetry.Metrics.MetricStreamIdentity` Metric tags are now considered identifiers,
* Update Metric tags to be identifying for the Meter, aligning with the specification. Previously, Metric tags were omitted from being identifying.

Copy link
Member

Choose a reason for hiding this comment

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

Will anyone reading this understand it? 🤣

How about...

  • Meter.Tags will now be considered when resolving the SDK metric to update when measurements are recorded. Meters with the same name and different tags will now lead to unique metrics.

PS: There is a lint error can't merge until that is resolved.

Copy link
Author

Choose a reason for hiding this comment

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

Fine with the latter, made the change. can linter re instigate, I will check if its yet too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package spec-compliance Issues related to compliance with the OpenTelemetry Specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] Mark instrumentation scope attributes as identifying
5 participants