Skip to content

Commit

Permalink
Update collector core dependency and adopt to the updated API (#11058)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax committed Jun 22, 2022
1 parent bfdaa34 commit 3dd3b94
Show file tree
Hide file tree
Showing 385 changed files with 3,295 additions and 2,521 deletions.
10 changes: 5 additions & 5 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/google/uuid v1.3.0
github.com/open-telemetry/opentelemetry-collector-contrib v0.53.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0
github.com/stretchr/testify v1.7.3
go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6
go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6
github.com/stretchr/testify v1.7.4
go.opentelemetry.io/collector v0.53.1-0.20220621130052-408f1e9f6d87
go.opentelemetry.io/collector/pdata v0.53.1-0.20220621130052-408f1e9f6d87
go.uber.org/multierr v1.8.0
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
golang.org/x/text v0.3.7
Expand Down Expand Up @@ -210,7 +210,7 @@ require (
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.15.6 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/knadh/koanf v1.4.2 // indirect
github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b // indirect
github.com/leoluk/perflib_exporter v0.1.0 // indirect
github.com/lib/pq v1.10.6 // indirect
Expand Down Expand Up @@ -492,7 +492,7 @@ require (
go.mongodb.org/atlas v0.16.0 // indirect
go.mongodb.org/mongo-driver v1.9.1 // indirect
go.opencensus.io v0.23.0 // indirect
go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect
go.opentelemetry.io/collector/semconv v0.53.1-0.20220621130052-408f1e9f6d87 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect
go.opentelemetry.io/contrib/zpages v0.32.0 // indirect
Expand Down
20 changes: 11 additions & 9 deletions cmd/configschema/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ require (
github.com/go-playground/locales v0.14.0
github.com/go-playground/universal-translator v0.18.0
github.com/go-playground/validator/v10 v10.11.0
github.com/stretchr/testify v1.7.3
go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6
go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6
github.com/stretchr/testify v1.7.4
go.opentelemetry.io/collector v0.53.1-0.20220621130052-408f1e9f6d87
go.opentelemetry.io/collector/pdata v0.53.1-0.20220621130052-408f1e9f6d87
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/knadh/koanf v1.4.2 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand Down
18 changes: 9 additions & 9 deletions cmd/mdatagen/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ require (
github.com/aliyun/aliyun-log-go-sdk v0.1.36
github.com/gogo/protobuf v1.3.2
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0
github.com/stretchr/testify v1.7.3
go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6
go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6
go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6
github.com/stretchr/testify v1.7.4
go.opentelemetry.io/collector v0.53.1-0.20220621130052-408f1e9f6d87
go.opentelemetry.io/collector/pdata v0.53.1-0.20220621130052-408f1e9f6d87
go.opentelemetry.io/collector/semconv v0.53.1-0.20220621130052-408f1e9f6d87
go.uber.org/zap v1.21.0
)

Expand All @@ -21,7 +21,7 @@ require (
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/knadh/koanf v1.4.1 // indirect
github.com/knadh/koanf v1.4.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
Expand Down
21 changes: 11 additions & 10 deletions exporter/alibabacloudlogserviceexporter/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -217,20 +217,20 @@ func doubleHistogramMetricsToLogs(name string, data pmetric.HistogramDataPointSl
int64(dataPoint.Timestamp()),
float64(dataPoint.Count())))

bounds := dataPoint.MExplicitBounds()
boundsStr := make([]string, len(bounds)+1)
for i := 0; i < len(bounds); i++ {
boundsStr[i] = strconv.FormatFloat(bounds[i], 'g', -1, 64)
bounds := dataPoint.ExplicitBounds()
boundsStr := make([]string, bounds.Len()+1)
for i := 0; i < bounds.Len(); i++ {
boundsStr[i] = strconv.FormatFloat(bounds.At(i), 'g', -1, 64)
}
boundsStr[len(boundsStr)-1] = infinityBoundValue

bucketCount := min(len(boundsStr), len(dataPoint.MBucketCounts()))
bucketCount := min(len(boundsStr), dataPoint.BucketCounts().Len())

bucketLabels := labels.Clone()
bucketLabels.Append(bucketLabelKey, "")
bucketLabels.Sort()
for i := 0; i < bucketCount; i++ {
bucket := dataPoint.MBucketCounts()[i]
bucket := dataPoint.BucketCounts().At(i)
bucketLabels.Replace(bucketLabelKey, boundsStr[i])

logs = append(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ func TestMetricDataToLogService(t *testing.T) {
doubleHistogramDataPoint.SetCount(2)
doubleHistogramDataPoint.SetSum(10.1)
doubleHistogramDataPoint.SetTimestamp(pcommon.Timestamp(100_000_000))
doubleHistogramDataPoint.SetMBucketCounts([]uint64{1, 2, 3})
doubleHistogramDataPoint.SetMExplicitBounds([]float64{1, 2})
doubleHistogramDataPoint.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 2, 3}))
doubleHistogramDataPoint.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2}))

doubleSummaryMetric := metrics.AppendEmpty()
doubleSummaryMetric.SetDataType(pmetric.MetricDataTypeSummary)
Expand Down
Loading

0 comments on commit 3dd3b94

Please sign in to comment.