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

Add minimal support for array value type #1523

Merged

Conversation

tigrannajaryan
Copy link
Member

@tigrannajaryan tigrannajaryan commented Aug 10, 2020

Array value type was added to AnyValue Protobuf definition but corresponding
support in the Collector was missing.

This commit adds AnyValueArray internal data type which wraps an a slice of
AnyValue pointers.

AnyValueArray supports minimal set of functions for now. We will add more
functions if needed in the future.

@codecov
Copy link

codecov bot commented Aug 10, 2020

Codecov Report

Merging #1523 into master will increase coverage by 0.12%.
The diff coverage is 96.12%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1523      +/-   ##
==========================================
+ Coverage   91.97%   92.09%   +0.12%     
==========================================
  Files         254      259       +5     
  Lines       17286    17516     +230     
==========================================
+ Hits        15899    16132     +233     
+ Misses        989      984       -5     
- Partials      398      400       +2     
Impacted Files Coverage Δ
exporter/kafkaexporter/otlp_marshaller.go 77.77% <77.77%> (ø)
exporter/kafkaexporter/jaeger_marshaller.go 90.00% <90.00%> (ø)
consumer/pdata/common.go 97.42% <90.62%> (+1.22%) ⬆️
receiver/kafkareceiver/zipkin_unmarshaller.go 92.85% <92.85%> (ø)
consumer/pdata/generated_common.go 100.00% <100.00%> (ø)
exporter/kafkaexporter/factory.go 100.00% <100.00%> (ø)
exporter/kafkaexporter/kafka_exporter.go 100.00% <100.00%> (ø)
exporter/kafkaexporter/marshaller.go 100.00% <100.00%> (ø)
receiver/kafkareceiver/factory.go 100.00% <100.00%> (ø)
receiver/kafkareceiver/jaeger_unmarshaller.go 100.00% <100.00%> (ø)
... and 12 more

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 7f13eb6...6ccd8cc. Read the comment docs.

@tigrannajaryan tigrannajaryan force-pushed the feature/tigran/attr-array branch 2 times, most recently from 1d88ecd to ff62b3c Compare August 11, 2020 14:58
@@ -36,13 +36,13 @@ func (ts TimestampUnixNano) String() string {
type AttributeValueType int

const (
AttributeValueNULL = iota
AttributeValueNULL AttributeValueType = iota
Copy link
Member

Choose a reason for hiding this comment

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

Why not using "AttributeValueNull" as name? Maybe in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean to avoid UPPERCASE?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Member Author

Choose a reason for hiding this comment

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

It is an exported name used in contrib. I am not sure we want to touch it. Certainly not in this PR, which only adds arrays. Perhaps in a future PR if we want it.

Copy link
Member

Choose a reason for hiding this comment

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

I would be happy to review a future PR that does this

consumer/pdata/value_array.go Outdated Show resolved Hide resolved
@@ -36,13 +36,13 @@ func (ts TimestampUnixNano) String() string {
type AttributeValueType int

const (
AttributeValueNULL = iota
AttributeValueNULL AttributeValueType = iota
Copy link
Member

Choose a reason for hiding this comment

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

I would be happy to review a future PR that does this

go.sum Outdated
@@ -10,6 +10,7 @@ cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6T
cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4=
Copy link
Member

Choose a reason for hiding this comment

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

Why all these changes in go.sum?

Array value type was added to AnyValue Protobuf definition but corresponding
support in the Collector was missing.

This commit adds AnyValueArray internal data type which wraps an a slice of
AnyValue pointers.

AnyValueArray supports minimal set of functions for now. We will add more
functions if needed in the future.
@tigrannajaryan
Copy link
Member Author

Merging. Contrib-test failure is unrelated is already being fixed in open-telemetry/opentelemetry-collector-contrib#831

@tigrannajaryan tigrannajaryan merged commit e04bb59 into open-telemetry:master Aug 26, 2020
@tigrannajaryan tigrannajaryan deleted the feature/tigran/attr-array branch August 26, 2020 19:46
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
* Bump github.com/apache/thrift to v0.16.0

* Exclude go.opencensus.io v0.19.1
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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.

2 participants