Skip to content

Commit

Permalink
Upgrade otel collector core, fix changes for non-nullable Instrumenta…
Browse files Browse the repository at this point in the history
…tionLibrary (#1702)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu committed Nov 25, 2020
1 parent 9a696f8 commit 0705ace
Show file tree
Hide file tree
Showing 141 changed files with 212 additions and 250 deletions.
2 changes: 1 addition & 1 deletion exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/gogo/protobuf v1.3.1
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
google.golang.org/protobuf v1.25.0
)
4 changes: 2 additions & 2 deletions exporter/alibabacloudlogserviceexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func createSimpleLogData(numberOfLogs int) pdata.Logs {
logRecord.Body().SetStringVal("mylog")
logRecord.Attributes().InsertString(conventions.AttributeServiceName, "myapp")
logRecord.Attributes().InsertString("my-label", "myapp-type")
logRecord.Attributes().InsertString(conventions.AttributeHostHostname, "myhost")
logRecord.Attributes().InsertString(conventions.AttributeHostName, "myhost")
logRecord.Attributes().InsertString("custom", "custom")
logRecord.SetTimestamp(ts)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ func resourceToLogContents(resource pdata.Resource) []*sls.LogContent {
}

func instrumentationLibraryToLogContents(instrumentationLibrary pdata.InstrumentationLibrary) []*sls.LogContent {
if instrumentationLibrary.IsNil() {
return nil
}
logContents := make([]*sls.LogContent, 2)
logContents[0] = &sls.LogContent{
Key: proto.String(slsLogInstrumentationName),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ func createLogData(numberOfLogs int) pdata.Logs {
logs.ResourceLogs().Append(rl2)
ill := pdata.NewInstrumentationLibraryLogs()
ill.InitEmpty()
ill.InstrumentationLibrary().InitEmpty()
ill.InstrumentationLibrary().SetName("collector")
ill.InstrumentationLibrary().SetVersion("v0.1.0")
rl.InstrumentationLibraryLogs().Append(ill)
Expand Down Expand Up @@ -93,7 +92,7 @@ func createLogData(numberOfLogs int) pdata.Logs {
}
logRecord.Attributes().InsertString(conventions.AttributeServiceName, "myapp")
logRecord.Attributes().InsertString("my-label", "myapp-type")
logRecord.Attributes().InsertString(conventions.AttributeHostHostname, "myhost")
logRecord.Attributes().InsertString(conventions.AttributeHostName, "myhost")
logRecord.Attributes().InsertString("custom", "custom")
logRecord.Attributes().InsertNull("null-value")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -96,7 +96,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -154,7 +154,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -212,7 +212,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -270,7 +270,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"map-value\":\"{\\\"array\\\":[\\\"array\\\"],\\\"code\\\":200,\\\"map\\\":{\\\"data\\\":\\\"hello world\\\"},\\\"null\\\":null,\\\"result\\\":true,\\\"status\\\":\\\"ok\\\",\\\"value\\\":1.3}\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"map-value\":\"{\\\"array\\\":[\\\"array\\\"],\\\"code\\\":200,\\\"map\\\":{\\\"data\\\":\\\"hello world\\\"},\\\"null\\\":null,\\\"result\\\":true,\\\"status\\\":\\\"ok\\\",\\\"value\\\":1.3}\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -328,7 +328,7 @@
},
{
"Key": "attribute",
"Value": "{\"array-value\":\"[\\\"array\\\"]\",\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"array-value\":\"[\\\"array\\\"]\",\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -386,7 +386,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -444,7 +444,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down Expand Up @@ -502,7 +502,7 @@
},
{
"Key": "attribute",
"Value": "{\"custom\":\"custom\",\"host.hostname\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
"Value": "{\"custom\":\"custom\",\"host.name\":\"myhost\",\"my-label\":\"myapp-type\",\"null-value\":\"\",\"service.name\":\"myapp\"}"
},
{
"Key": "content",
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ require (
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.1.2
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
)
4 changes: 2 additions & 2 deletions exporter/awsemfexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsemfexporter/metric_translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TranslateOtToCWMetric(rm *pdata.ResourceMetrics, config *Config) ([]*CWMetr
if ilm.IsNil() {
continue
}
if ilm.InstrumentationLibrary().IsNil() {
if ilm.InstrumentationLibrary().Name() == "" {
instrumentationLibName = noInstrumentationLibraryName
} else {
instrumentationLibName = ilm.InstrumentationLibrary().Name()
Expand Down
4 changes: 0 additions & 4 deletions exporter/awsemfexporter/metric_translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ func TestTranslateOtToCWMetricWithInstrLibrary(t *testing.T) {
rm := internaldata.OCToMetrics(md).ResourceMetrics().At(0)
ilms := rm.InstrumentationLibraryMetrics()
ilm := ilms.At(0)
ilm.InstrumentationLibrary().InitEmpty()
ilm.InstrumentationLibrary().SetName("cloudwatch-lib")
cwm, totalDroppedMetrics := TranslateOtToCWMetric(&rm, config)
assert.Equal(t, 0, totalDroppedMetrics)
Expand Down Expand Up @@ -543,7 +542,6 @@ func TestTranslateOtToCWMetricWithFiltering(t *testing.T) {

rm := internaldata.OCToMetrics(md).ResourceMetrics().At(0)
ilm := rm.InstrumentationLibraryMetrics().At(0)
ilm.InstrumentationLibrary().InitEmpty()
ilm.InstrumentationLibrary().SetName("cloudwatch-lib")

testCases := []struct {
Expand Down Expand Up @@ -2193,7 +2191,6 @@ func BenchmarkTranslateOtToCWMetricWithInstrLibrary(b *testing.B) {
rm := internaldata.OCToMetrics(md).ResourceMetrics().At(0)
ilms := rm.InstrumentationLibraryMetrics()
ilm := ilms.At(0)
ilm.InstrumentationLibrary().InitEmpty()
ilm.InstrumentationLibrary().SetName("cloudwatch-lib")
config := &Config{
Namespace: "",
Expand Down Expand Up @@ -2225,7 +2222,6 @@ func BenchmarkTranslateOtToCWMetricWithFiltering(b *testing.B) {
rm := internaldata.OCToMetrics(md).ResourceMetrics().At(0)
ilms := rm.InstrumentationLibraryMetrics()
ilm := ilms.At(0)
ilm.InstrumentationLibrary().InitEmpty()
ilm.InstrumentationLibrary().SetName("cloudwatch-lib")
m := MetricDeclaration{
Dimensions: [][]string{{"spanName"}},
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsprometheusremotewriteexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.15
require (
github.com/aws/aws-sdk-go v1.35.5
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
)
4 changes: 2 additions & 2 deletions exporter/awsprometheusremotewriteexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/aws/aws-sdk-go v1.35.33
github.com/open-telemetry/opentelemetry-collector-contrib/internal/awsxray v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
google.golang.org/grpc/examples v0.0.0-20200728194956-1c32b02682df // indirect
Expand Down
4 changes: 2 additions & 2 deletions exporter/awsxrayexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
2 changes: 1 addition & 1 deletion exporter/azuremonitorexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/stretchr/testify v1.6.1
github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 // indirect
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
golang.org/x/net v0.0.0-20201021035429-f5854403a974
google.golang.org/grpc v1.33.2
Expand Down
4 changes: 2 additions & 2 deletions exporter/azuremonitorexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
12 changes: 5 additions & 7 deletions exporter/azuremonitorexporter/trace_to_envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,12 @@ func spanToEnvelope(
resourceAttributes.ForEach(func(k string, v pdata.AttributeValue) { dataProperties[k] = v.StringVal() })

// Copy the instrumentation properties
if !instrumentationLibrary.IsNil() {
if instrumentationLibrary.Name() != "" {
dataProperties[instrumentationLibraryName] = instrumentationLibrary.Name()
}
if instrumentationLibrary.Name() != "" {
dataProperties[instrumentationLibraryName] = instrumentationLibrary.Name()
}

if instrumentationLibrary.Version() != "" {
dataProperties[instrumentationLibraryVersion] = instrumentationLibrary.Version()
}
if instrumentationLibrary.Version() != "" {
dataProperties[instrumentationLibraryVersion] = instrumentationLibrary.Version()
}

// Extract key service.* labels from the Resource labels and construct CloudRole and CloudRoleInstance envelope tags
Expand Down
1 change: 0 additions & 1 deletion exporter/azuremonitorexporter/trace_to_envelope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,6 @@ func getResource() pdata.Resource {
// Returns a default instrumentation library
func getInstrumentationLibrary() pdata.InstrumentationLibrary {
il := pdata.NewInstrumentationLibrary()
il.InitEmpty()
il.SetName(defaultInstrumentationLibraryName)
il.SetVersion(defaultInstrumentationLibraryVersion)
return il
Expand Down
2 changes: 1 addition & 1 deletion exporter/carbonexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.14
require (
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
google.golang.org/grpc/examples v0.0.0-20200728194956-1c32b02682df // indirect
)
4 changes: 2 additions & 2 deletions exporter/carbonexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
3 changes: 1 addition & 2 deletions exporter/datadogexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/stretchr/testify v1.6.1
github.com/zorkian/go-datadog-api v2.29.0+incompatible // indirect
go.opencensus.io v0.22.5
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
gopkg.in/DataDog/dd-trace-go.v1 v1.27.1
gopkg.in/zorkian/go-datadog-api.v2 v2.30.0
Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec h1:tCe+0mw7Kz7FoWZDFid+Vdffpo79oJTf9/AVGkUxUaw=
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f h1:OOvlsyf5LHQvhNBcs3rp/lV2LP249ykDmYeGGSAdMbE=
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f/go.mod h1:OU+7IlgIKEQAcZVx/5Wmk3O1HNyDuGpRt+qaU6qOHR8=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
Expand Down
3 changes: 0 additions & 3 deletions exporter/datadogexporter/translate_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,6 @@ func extractDatadogServiceName(datadogTags map[string]string) string {
}

func extractInstrumentationLibraryTags(il pdata.InstrumentationLibrary, datadogTags map[string]string) {
if il.IsNil() {
return
}
if ilName := il.Name(); ilName != "" {
datadogTags[tracetranslator.TagInstrumentationName] = ilName
}
Expand Down
3 changes: 0 additions & 3 deletions exporter/datadogexporter/translate_traces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ func NewResourceSpansData(mockTraceID [16]byte, mockSpanID [8]byte, mockParentSp
resource.CopyTo(rs.Resource())

il := pdata.NewInstrumentationLibrary()
il.InitEmpty()
il.SetName("test_il_name")
il.SetVersion("test_il_version")

Expand Down Expand Up @@ -153,7 +152,6 @@ func TestObfuscation(t *testing.T) {
})

instrumentationLibrary := pdata.NewInstrumentationLibrary()
instrumentationLibrary.InitEmpty()
instrumentationLibrary.SetName("flash")
instrumentationLibrary.SetVersion("v1")

Expand Down Expand Up @@ -510,7 +508,6 @@ func TestSpanTypeTranslation(t *testing.T) {
// ensure that the IL Tags extraction handles nil case
func TestILTagsExctraction(t *testing.T) {
il := pdata.NewInstrumentationLibrary()
il.InitEmpty()

tags := map[string]string{}

Expand Down
2 changes: 1 addition & 1 deletion exporter/dynatraceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.14

require (
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.15.1-0.20201125151900-b19b5ac392ec
go.opentelemetry.io/collector v0.15.1-0.20201125171618-60498105d42f
go.uber.org/zap v1.16.0
)
Loading

0 comments on commit 0705ace

Please sign in to comment.