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 core dependency and adapt the code #9389

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib v0.49.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.49.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.49.0
go.opentelemetry.io/collector/pdata v0.49.0
go.opentelemetry.io/collector v0.49.1-0.20220421154122-427f7dde5a8f
go.opentelemetry.io/collector/pdata v0.49.1-0.20220421154122-427f7dde5a8f
go.uber.org/multierr v1.8.0
golang.org/x/mod v0.5.1
golang.org/x/text v0.3.7
Expand Down Expand Up @@ -810,3 +810,5 @@ exclude github.com/StackExchange/wmi v1.2.0

// see https://github.com/distribution/distribution/issues/3590
exclude github.com/docker/distribution v2.8.0+incompatible

replace go.opentelemetry.io/collector/semconv => go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
7 changes: 4 additions & 3 deletions cmd/configschema/go.sum

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

11 changes: 9 additions & 2 deletions cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ require (
github.com/go-playground/universal-translator v0.18.0
github.com/go-playground/validator/v10 v10.10.1
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.49.0
go.opentelemetry.io/collector/pdata v0.49.0
go.opentelemetry.io/collector v0.49.1-0.20220421154122-427f7dde5a8f
go.opentelemetry.io/collector/pdata v0.49.1-0.20220421154122-427f7dde5a8f
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // 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/leodido/go-urn v1.2.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand All @@ -27,8 +28,14 @@ require (
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace go.opentelemetry.io/collector/semconv => go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
91 changes: 87 additions & 4 deletions cmd/mdatagen/go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cmd/mdatagen/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func Test_loadMetadata(t *testing.T) {
ExtendedDocumentation: "Additional information on CPU Time can be found [here](https://en.wikipedia.org/wiki/CPU_time).",
Unit: "s",
Sum: &sum{
MetricValueType: MetricValueType{pmetric.MetricValueTypeDouble},
MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble},
Aggregated: Aggregated{Aggregation: "cumulative"},
Mono: Mono{Monotonic: true},
},
Expand All @@ -64,7 +64,7 @@ func Test_loadMetadata(t *testing.T) {
Description: "Percentage of CPU time broken down by different states.",
Unit: "1",
Gauge: &gauge{
MetricValueType: MetricValueType{pmetric.MetricValueTypeDouble},
MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble},
},
Attributes: []attributeName{"enumAttribute"},
},
Expand Down
10 changes: 5 additions & 5 deletions cmd/mdatagen/metricdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ func (mit MetricInputType) String() string {
// MetricValueType defines the metric number type.
type MetricValueType struct {
// ValueType is type of the metric number, options are "double", "int".
ValueType pmetric.MetricValueType `validate:"required"`
ValueType pmetric.NumberDataPointValueType `validate:"required"`
}

// UnmarshalText implements the encoding.TextUnmarshaler interface.
func (mvt *MetricValueType) UnmarshalText(text []byte) error {
switch vtStr := string(text); vtStr {
case "int":
mvt.ValueType = pmetric.MetricValueTypeInt
mvt.ValueType = pmetric.NumberDataPointValueTypeInt
case "double":
mvt.ValueType = pmetric.MetricValueTypeDouble
mvt.ValueType = pmetric.NumberDataPointValueTypeDouble
default:
return fmt.Errorf("invalid value_type: %q", vtStr)
}
Expand All @@ -98,9 +98,9 @@ func (mvt MetricValueType) String() string {
// BasicType returns name of a golang basic type for the datapoint type.
func (mvt MetricValueType) BasicType() string {
switch mvt.ValueType {
case pmetric.MetricValueTypeInt:
case pmetric.NumberDataPointValueTypeInt:
return "int64"
case pmetric.MetricValueTypeDouble:
case pmetric.NumberDataPointValueTypeDouble:
return "float64"
default:
return ""
Expand Down
2 changes: 2 additions & 0 deletions examples/demo/client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ require (
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)

replace go.opentelemetry.io/collector/semconv => go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
2 changes: 2 additions & 0 deletions examples/demo/server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ require (
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)

replace go.opentelemetry.io/collector/semconv => go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
10 changes: 8 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.49.0
github.com/stretchr/testify v1.7.1
go.opentelemetry.io/collector v0.49.0
go.opentelemetry.io/collector/pdata v0.49.0
go.opentelemetry.io/collector v0.49.1-0.20220421154122-427f7dde5a8f
go.opentelemetry.io/collector/pdata v0.49.1-0.20220421154122-427f7dde5a8f
go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
go.uber.org/zap v1.21.0
)
Expand All @@ -35,10 +35,16 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal

replace go.opentelemetry.io/collector/semconv => go.opentelemetry.io/collector/semconv v0.0.0-20220421154122-427f7dde5a8f
Loading