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

Use Distinct instead of Set for map keys #5027

Merged
merged 4 commits into from Mar 6, 2024

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Mar 4, 2024

As discussed in the last SIG meeting, this is a follow up to #4985. It changes our code to follow out documentation and use the Distinct type as a map key.

It also clarifies the documentation of the Set and Distinct types. There aren't any plans to change the equivalence of Sets the the documentation need to be made explicit to communicate to users the possibility.

Optimization of using Distinct as a map key are to follow (#5028).

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.5%. Comparing base (da2949b) to head (8bc3fb8).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5027   +/-   ##
=====================================
  Coverage   83.4%   83.5%           
=====================================
  Files        238     238           
  Lines      15754   15757    +3     
=====================================
+ Hits       13146   13159   +13     
+ Misses      2318    2309    -9     
+ Partials     290     289    -1     
Files Coverage Δ
attribute/set.go 78.3% <ø> (ø)
...metric/internal/aggregate/exponential_histogram.go 97.0% <100.0%> (+<0.1%) ⬆️
sdk/metric/internal/aggregate/histogram.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/lastvalue.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/limit.go 100.0% <100.0%> (ø)
sdk/metric/internal/aggregate/sum.go 100.0% <100.0%> (ø)

... and 2 files with indirect coverage changes

@MrAlias MrAlias added pkg:attribute Related to the attribute package area:metrics Part of OpenTelemetry Metrics labels Mar 4, 2024
@MrAlias MrAlias added this to the v1.25.0 milestone Mar 4, 2024
@MrAlias MrAlias marked this pull request as ready for review March 4, 2024 19:52
@pellared pellared merged commit fe9bab5 into open-telemetry:main Mar 6, 2024
29 checks passed
@MrAlias MrAlias deleted the set-to-distinct branch March 6, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:attribute Related to the attribute package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants