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

[pdata] Rename methods dealing with slices of primitive type items #5344

Merged

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented May 11, 2022

  • In preparation of migration to immutable slices for primitive type items the following methods are renamed:
    • Value.BytesVal func is deprecated in favor of Value.MBytesVal.
    • Value.SetBytesVal func is deprecated in favor of Value.SetMBytesVal.
    • Value.UpdateBytes func is deprecated in favor of Value.UpdateMBytes.
    • Value.InsertBytes func is deprecated in favor of Value.InsertMBytes.
    • Value.UpsertBytes func is deprecated in favor of Value.UpsertMBytes.
    • <HistogramDataPoint|Buckets>.BucketCounts funcs are deprecated in favor of
      <HistogramDataPoint|Buckets>.MBucketCounts.
    • <HistogramDataPoint|Buckets>.SetBucketCounts funcs are deprecated in favor of
      <HistogramDataPoint|Buckets>.SetMBucketCounts.
    • HistogramDataPoint.ExplicitBounds func is deprecated in favor of HistogramDataPoint.MExplicitBounds.
    • HistogramDataPoint.SetExplicitBounds func is deprecated in favor of HistogramDataPoint.SetMExplicitBounds.

This is the first step towards solving #5263

@dmitryax dmitryax requested a review from a team as a code owner May 11, 2022 19:49
@dmitryax dmitryax requested a review from bogdandrutu May 11, 2022 19:49
@dmitryax dmitryax force-pushed the rename-primitive-slice-methods branch from 099c43f to 0577bef Compare May 11, 2022 19:50
@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #5344 (fd5bf34) into main (7f66c9c) will decrease coverage by 0.25%.
The diff coverage is 54.54%.

@@            Coverage Diff             @@
##             main    #5344      +/-   ##
==========================================
- Coverage   90.77%   90.52%   -0.26%     
==========================================
  Files         190      190              
  Lines       11405    11435      +30     
==========================================
- Hits        10353    10351       -2     
- Misses        831      862      +31     
- Partials      221      222       +1     
Impacted Files Coverage Δ
pdata/internal/metrics.go 84.09% <0.00%> (-8.41%) ⬇️
pdata/internal/common.go 91.82% <60.00%> (-3.57%) ⬇️
internal/otlptext/databuffer.go 100.00% <100.00%> (ø)
pdata/internal/generated_pmetric.go 97.25% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f66c9c...fd5bf34. Read the comment docs.

- In preparation of migration to immutable slices for primitive type items the following methods are renamed:
  - `Value.BytesVal` func is deprecated in favor of `Value.MBytesVal`.
  - `Value.SetBytesVal` func is deprecated in favor of `Value.SetMBytesVal`.
  - `Value.UpdateBytes` func is deprecated in favor of `Value.UpdateMBytes`.
  - `Value.InsertBytes` func is deprecated in favor of `Value.InsertMBytes`.
  - `Value.UpsertBytes` func is deprecated in favor of `Value.UpsertMBytes`.
  - `<HistogramDataPoint|Buckets>.BucketCounts` funcs are deprecated in favor of
    `<HistogramDataPoint|Buckets>.MBucketCounts`.
  - `<HistogramDataPoint|Buckets>.SetBucketCounts` funcs are deprecated in favor of
    `<HistogramDataPoint|Buckets>.SetMBucketCounts`.
  - `HistogramDataPoint.ExplicitBounds` func is deprecated in favor of `HistogramDataPoint.MExplicitBounds`.
  - `HistogramDataPoint.SetExplicitBounds` func is deprecated in favor of `HistogramDataPoint.SetMExplicitBounds`.
@dmitryax dmitryax force-pushed the rename-primitive-slice-methods branch from 0577bef to cecf347 Compare May 11, 2022 19:54
@bogdandrutu bogdandrutu merged commit 6cde802 into open-telemetry:main May 11, 2022
@dmitryax dmitryax deleted the rename-primitive-slice-methods branch May 11, 2022 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants