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

Rename pdata.AnyValueArray to AttributeSlice #4325

Merged
merged 11 commits into from
Nov 3, 2021

Conversation

Aneurysm9
Copy link
Member

Signed-off-by: Anthony J Mirabella a9@aneurysm9.com

@Aneurysm9 Aneurysm9 requested review from a team and tigrannajaryan October 29, 2021 21:46
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #4325 (431c966) into main (7e4a7e3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4325   +/-   ##
=======================================
  Coverage   88.13%   88.13%           
=======================================
  Files         176      176           
  Lines       10425    10425           
=======================================
  Hits         9188     9188           
  Misses       1005     1005           
  Partials      232      232           
Impacted Files Coverage Δ
internal/otlptext/databuffer.go 100.00% <100.00%> (ø)
model/pdata/common.go 95.14% <100.00%> (ø)
model/pdata/generated_common.go 100.00% <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 7e4a7e3...431c966. Read the comment docs.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

LGTM in general except that small inconsistency, can be done in a separate PR but we need to confirm the names here.

model/pdata/common.go Outdated Show resolved Hide resolved
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
model/pdata/common.go Outdated Show resolved Hide resolved
model/pdata/common.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Anthony J Mirabella <a9@aneurysm9.com>
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my comments!

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Will not merge until contrib is green with what is merged in main. It means someone needs to upgrade contrib to pass with the current main before this gets merged to not have more than one breaking change to fix.

@tigrannajaryan
Copy link
Member

Since the PR is fixing names I feel compelled to comment on naming despite 3 approvals :-)

AttributeSlice doesn't seem like a good name for an array of values. This is not a slice of attributes. Attributes are key/value pairs. This is a slice of AnyValue. May be call it AttributeValueSlice? (a bit too long IMO).

I believe attribute means a distinct thing and this uses the term incorrectly.

@bogdandrutu
Copy link
Member

@tigrannajaryan sounds good to me AttributeValueSlice what about the other funcs on AttributeValue? is ok to use SliceVal?

@tigrannajaryan
Copy link
Member

@tigrannajaryan sounds good to me AttributeValueSlice what about the other funcs on AttributeValue? is ok to use SliceVal?

Yes, I think it is fine to rename Array->Slice.

@Aneurysm9
Copy link
Member Author

What then of AttributeMap? It stores *[]otlpcommon.KeyValue whose values are AnyValue.

@bogdandrutu
Copy link
Member

AttributeMap stores attributes, every entry has a "key" and a "AnyValue"

@bogdandrutu
Copy link
Member

bogdandrutu commented Nov 3, 2021

So I think the mapping is:

  • otlpcommon.KeyValue => Attribute
  • otlpcommon.AnyValue => AttributeValue

@bogdandrutu bogdandrutu merged commit cffbecb into open-telemetry:main Nov 3, 2021
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.

5 participants