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

Update OTel dependencies #721

Merged
merged 3 commits into from Sep 13, 2023
Merged

Conversation

anuraaga
Copy link
Contributor

Fixes #719

@anuraaga anuraaga requested a review from a team as a code owner September 13, 2023 01:44
@@ -49,6 +49,7 @@ tools: $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(GOJQ) $(FIELDALI

PROTOBUF_VERSION = 3.19.0
PROTOBUF_OS = linux
UNAME_S := $(shell uname -s)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed protoc wasn't working on my mac as this variable wasn't actually set to anything, I believe it was removed with some cleanup at some point. It could be nice to run the entire CI on multiple machines to ensure it continues to build on them, though the notable step is this one I think

https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/.github/workflows/ci.yml#L41

desc: "sum without total is unaffected when normalization disabled",
baseName: "foo",
metric: func(m pmetric.Metric) {
//nolint:errcheck
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default for this feature gate changed, I tried to preserve tests with and without the change

@@ -238,6 +278,10 @@ func TestGetMetricName(t *testing.T) {
},
} {
t.Run(tc.desc, func(t *testing.T) {
// Name translation uses global feature gate registry, set to defaults before each test.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was missing before but seems to be important

@@ -307,7 +307,7 @@ func TestHistogramPointToTimeSeries(t *testing.T) {
hdp := ts.Points[0].Value.GetDistributionValue()
assert.Equal(t, int64(15), hdp.Count)
assert.ElementsMatch(t, []int64{1, 2, 3, 4, 5}, hdp.BucketCounts)
assert.Equal(t, 12847.600000000002, hdp.SumOfSquaredDeviation)
assert.InDelta(t, 12847.6, hdp.SumOfSquaredDeviation, 0.0001)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was failing for me on M1, I think this is an appropriate way of asserting on a floating point number that is going through rounding

@@ -155,7 +154,7 @@ func (me *metricExporter) Temporality(ik metric.InstrumentKind) metricdata.Tempo
}

// Aggregation returns the Aggregation to use for an instrument kind.
func (me *metricExporter) Aggregation(ik metric.InstrumentKind) aggregation.Aggregation {
func (me *metricExporter) Aggregation(ik metric.InstrumentKind) metric.Aggregation {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only non-test change to work with the new version of the SDK

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #721 (a71d823) into main (70449de) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #721      +/-   ##
==========================================
- Coverage   69.58%   69.50%   -0.09%     
==========================================
  Files          42       42              
  Lines        4840     4840              
==========================================
- Hits         3368     3364       -4     
- Misses       1321     1325       +4     
  Partials      151      151              
Files Changed Coverage Δ
exporter/metric/metric.go 69.70% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dashpole
Copy link
Contributor

/gcbrun

@dashpole dashpole merged commit 82615d0 into GoogleCloudPlatform:main Sep 13, 2023
24 of 25 checks passed
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.

Dependency conflict with latest metric SDK
2 participants