Skip to content

Commit

Permalink
chore: update OpenTelemetry to v0.38.1-0.20211103215828-cffbecb2ac9e
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmarble committed Nov 4, 2021
1 parent abe8a92 commit bde918d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func AttributeValueToInfluxTagValue(value pdata.AttributeValue) (string, error)
return string(jsonBytes), nil
}
case pdata.AttributeValueTypeArray:
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.ArrayVal())); err != nil {
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.SliceVal())); err != nil {
return "", err
} else {
return string(jsonBytes), nil
Expand Down Expand Up @@ -134,7 +134,7 @@ func AttributeValueToInfluxFieldValue(value pdata.AttributeValue) (interface{},
return string(jsonBytes), nil
}
case pdata.AttributeValueTypeArray:
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.ArrayVal())); err != nil {
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.SliceVal())); err != nil {
return nil, err
} else {
return string(jsonBytes), nil
Expand All @@ -161,7 +161,7 @@ func otlpKeyValueListToMap(kvList pdata.AttributeMap) map[string]interface{} {
case pdata.AttributeValueTypeMap:
m[k] = otlpKeyValueListToMap(v.MapVal())
case pdata.AttributeValueTypeArray:
m[k] = otlpArrayToSlice(v.ArrayVal())
m[k] = otlpArrayToSlice(v.SliceVal())
case pdata.AttributeValueTypeEmpty:
m[k] = nil
default:
Expand All @@ -172,7 +172,7 @@ func otlpKeyValueListToMap(kvList pdata.AttributeMap) map[string]interface{} {
return m
}

func otlpArrayToSlice(arr pdata.AnyValueArray) []interface{} {
func otlpArrayToSlice(arr pdata.AttributeValueSlice) []interface{} {
s := make([]interface{}, 0, arr.Len())
for i := 0; i < arr.Len(); i++ {
v := arr.At(i)
Expand Down
2 changes: 1 addition & 1 deletion common/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/influxdata/influxdb-observability/common

go 1.16

require go.opentelemetry.io/collector/model v0.38.0
require go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
4 changes: 2 additions & 2 deletions common/go.sum

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

2 changes: 1 addition & 1 deletion influx2otel/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/influxdata/influxdb-observability/common v0.2.8
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector/model v0.38.0
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
)

replace github.com/influxdata/influxdb-observability/common => ../common
4 changes: 2 additions & 2 deletions influx2otel/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 otel2influx/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func AttributeValueToInfluxTagValue(value pdata.AttributeValue) (string, error)
return string(jsonBytes), nil
}
case pdata.AttributeValueTypeArray:
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.ArrayVal())); err != nil {
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.SliceVal())); err != nil {
return "", err
} else {
return string(jsonBytes), nil
Expand Down Expand Up @@ -79,7 +79,7 @@ func AttributeValueToInfluxFieldValue(value pdata.AttributeValue) (interface{},
return string(jsonBytes), nil
}
case pdata.AttributeValueTypeArray:
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.ArrayVal())); err != nil {
if jsonBytes, err := json.Marshal(otlpArrayToSlice(value.SliceVal())); err != nil {
return nil, err
} else {
return string(jsonBytes), nil
Expand All @@ -106,7 +106,7 @@ func otlpKeyValueListToMap(kvList pdata.AttributeMap) map[string]interface{} {
case pdata.AttributeValueTypeMap:
m[k] = otlpKeyValueListToMap(v.MapVal())
case pdata.AttributeValueTypeArray:
m[k] = otlpArrayToSlice(v.ArrayVal())
m[k] = otlpArrayToSlice(v.SliceVal())
case pdata.AttributeValueTypeEmpty:
m[k] = nil
default:
Expand All @@ -117,7 +117,7 @@ func otlpKeyValueListToMap(kvList pdata.AttributeMap) map[string]interface{} {
return m
}

func otlpArrayToSlice(arr pdata.AnyValueArray) []interface{} {
func otlpArrayToSlice(arr pdata.AttributeValueSlice) []interface{} {
s := make([]interface{}, 0, arr.Len())
for i := 0; i < arr.Len(); i++ {
v := arr.At(i)
Expand Down
2 changes: 1 addition & 1 deletion otel2influx/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.16
require (
github.com/influxdata/influxdb-observability/common v0.2.8
github.com/stretchr/testify v1.7.0
go.opentelemetry.io/collector/model v0.38.0
go.opentelemetry.io/collector/model v0.38.1-0.20211103215828-cffbecb2ac9e
)

replace github.com/influxdata/influxdb-observability/common => ../common
4 changes: 2 additions & 2 deletions otel2influx/go.sum

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

0 comments on commit bde918d

Please sign in to comment.