Skip to content

Commit 839e505

Browse files
authored
Bumping otel version to v0.18.0. Prepare for releasing v0.18.0 (#600)
* Bumping otel version to v0.18.0. Prepare for releasing v0.18.0 * Update CHANGELOG * Address review feedback
1 parent f82555b commit 839e505

File tree

174 files changed

+1835
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1835
-1727
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
## [Unreleased]
1010

11+
## [0.18.0] - 2021-03-04
12+
1113
### Fixed
1214

1315
- `otelmemcache` no longer sets span status to OK instead of leaving it unset. (#477)
16+
- Fix goroutine leak in gRPC `StreamClientInterceptor`. (#581)
1417

1518
### Removed
1619

@@ -281,7 +284,8 @@ First official tagged release of `contrib` repository.
281284
- Prefix support for dogstatsd (#34)
282285
- Update Go Runtime package to use batch observer (#44)
283286

284-
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v0.17.0...HEAD
287+
[Unreleased]: https://github.com/open-telemetry/opentelemetry-go-contrib/compare/v0.18.0...HEAD
288+
[0.18.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.18.0
285289
[0.17.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.17.0
286290
[0.16.0]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.16.0
287291
[0.15.1]: https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v0.15.1

contrib.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package contrib // import "go.opentelemetry.io/contrib"
1818

1919
// Version is the current release version of OpenTelemetry Contrib in use.
2020
func Version() string {
21-
return "0.17.0"
21+
return "0.18.0"
2222
// This string is updated by the pre_release.sh script during release
2323
}
2424

detectors/aws/aws.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/aws/aws-sdk-go/aws/ec2metadata"
2424
"github.com/aws/aws-sdk-go/aws/session"
2525

26-
"go.opentelemetry.io/otel/label"
26+
"go.opentelemetry.io/otel/attribute"
2727
"go.opentelemetry.io/otel/sdk/resource"
2828
"go.opentelemetry.io/otel/semconv"
2929
)
@@ -58,7 +58,7 @@ func (aws *AWS) Detect(ctx context.Context) (*resource.Resource, error) {
5858
return nil, err
5959
}
6060

61-
labels := []label.KeyValue{
61+
attributes := []attribute.KeyValue{
6262
semconv.CloudProviderAWS,
6363
semconv.CloudRegionKey.String(doc.Region),
6464
semconv.CloudZoneKey.String(doc.AvailabilityZone),
@@ -71,13 +71,13 @@ func (aws *AWS) Detect(ctx context.Context) (*resource.Resource, error) {
7171
m := &metadata{client: client}
7272
m.add(semconv.HostNameKey, "hostname")
7373

74-
labels = append(labels, m.labels...)
74+
attributes = append(attributes, m.attributes...)
7575

7676
if len(m.errs) > 0 {
7777
err = fmt.Errorf("%w: %s", resource.ErrPartialResource, m.errs)
7878
}
7979

80-
return resource.NewWithAttributes(labels...), err
80+
return resource.NewWithAttributes(attributes...), err
8181
}
8282

8383
func (aws *AWS) client() (client, error) {
@@ -94,15 +94,15 @@ func (aws *AWS) client() (client, error) {
9494
}
9595

9696
type metadata struct {
97-
client client
98-
errs []error
99-
labels []label.KeyValue
97+
client client
98+
errs []error
99+
attributes []attribute.KeyValue
100100
}
101101

102-
func (m *metadata) add(k label.Key, n string) {
102+
func (m *metadata) add(k attribute.Key, n string) {
103103
v, err := m.client.GetMetadata(n)
104104
if err == nil {
105-
m.labels = append(m.labels, k.String(v))
105+
m.attributes = append(m.attributes, k.String(v))
106106
return
107107
}
108108

detectors/aws/aws_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/stretchr/testify/assert"
2727
"github.com/stretchr/testify/require"
2828

29-
"go.opentelemetry.io/otel/label"
29+
"go.opentelemetry.io/otel/attribute"
3030
"go.opentelemetry.io/otel/sdk/resource"
3131
"go.opentelemetry.io/otel/semconv"
3232
)
@@ -61,7 +61,7 @@ func TestAWS_Detect(t *testing.T) {
6161
return doc, nil
6262
}
6363

64-
usWestIDLabels := []label.KeyValue{
64+
usWestIDLabels := []attribute.KeyValue{
6565
semconv.CloudProviderAWS,
6666
semconv.CloudRegionKey.String("us-west-2"),
6767
semconv.CloudZoneKey.String("us-west-2b"),

detectors/aws/ecs/ecs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os"
2222
"strings"
2323

24-
"go.opentelemetry.io/otel/label"
24+
"go.opentelemetry.io/otel/attribute"
2525
"go.opentelemetry.io/otel/sdk/resource"
2626
"go.opentelemetry.io/otel/semconv"
2727
)
@@ -83,12 +83,12 @@ func (detector *resourceDetector) Detect(ctx context.Context) (*resource.Resourc
8383
if err != nil {
8484
return empty, err
8585
}
86-
labels := []label.KeyValue{
86+
attributes := []attribute.KeyValue{
8787
semconv.ContainerNameKey.String(hostName),
8888
semconv.ContainerIDKey.String(containerID),
8989
}
9090

91-
return resource.NewWithAttributes(labels...), nil
91+
return resource.NewWithAttributes(attributes...), nil
9292
}
9393

9494
// returns docker container ID from default c group path

detectors/aws/ecs/ecs_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"github.com/stretchr/testify/assert"
2323
"github.com/stretchr/testify/mock"
2424

25-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
2626
"go.opentelemetry.io/otel/sdk/resource"
2727
"go.opentelemetry.io/otel/semconv"
2828
)
@@ -53,11 +53,11 @@ func TestDetect(t *testing.T) {
5353
detectorUtils.On("getContainerName").Return("container-Name", nil)
5454
detectorUtils.On("getContainerID").Return("0123456789A", nil)
5555

56-
labels := []label.KeyValue{
56+
attributes := []attribute.KeyValue{
5757
semconv.ContainerNameKey.String("container-Name"),
5858
semconv.ContainerIDKey.String("0123456789A"),
5959
}
60-
expectedResource := resource.NewWithAttributes(labels...)
60+
expectedResource := resource.NewWithAttributes(attributes...)
6161
detector := &resourceDetector{utils: detectorUtils}
6262
res, _ := detector.Detect(context.Background())
6363

detectors/aws/ecs/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ go 1.15
44

55
require (
66
github.com/stretchr/testify v1.7.0
7-
go.opentelemetry.io/otel v0.17.0
8-
go.opentelemetry.io/otel/sdk v0.17.0
7+
go.opentelemetry.io/otel v0.18.0
8+
go.opentelemetry.io/otel/sdk v0.18.0
99
)

detectors/aws/ecs/go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
88
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
99
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
1010
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
11-
go.opentelemetry.io/otel v0.17.0 h1:6MKOu8WY4hmfpQ4oQn34u6rYhnf2sWf1LXYO/UFm71U=
12-
go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s=
13-
go.opentelemetry.io/otel/metric v0.17.0 h1:t+5EioN8YFXQ2EH+1j6FHCKMUj+57zIDSnSGr/mWuug=
14-
go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0=
15-
go.opentelemetry.io/otel/oteltest v0.17.0 h1:TyAihUowTDLqb4+m5ePAsR71xPJaTBJl4KDArIdi9k4=
16-
go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE=
17-
go.opentelemetry.io/otel/sdk v0.17.0 h1:eHXQwanmbtSHM/GcJYbJ8FyyH/sT9a0e+1Z9ZWkF7Ug=
18-
go.opentelemetry.io/otel/sdk v0.17.0/go.mod h1:INs1PePjjF2hf842AXsxGTe5lH023QfLTZRFPiV/RUk=
19-
go.opentelemetry.io/otel/trace v0.17.0 h1:SBOj64/GAOyWzs5F680yW1ITIfJkm6cJWL2YAvuL9xY=
20-
go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg=
11+
go.opentelemetry.io/otel v0.18.0 h1:d5Of7+Zw4ANFOJB+TIn2K3QWsgS2Ht7OU9DqZHI6qu8=
12+
go.opentelemetry.io/otel v0.18.0/go.mod h1:PT5zQj4lTsR1YeARt8YNKcFb88/c2IKoSABK9mX0r78=
13+
go.opentelemetry.io/otel/metric v0.18.0 h1:yuZCmY9e1ZTaMlZXLrrbAPmYW6tW1A5ozOZeOYGaTaY=
14+
go.opentelemetry.io/otel/metric v0.18.0/go.mod h1:kEH2QtzAyBy3xDVQfGZKIcok4ZZFvd5xyKPfPcuK6pE=
15+
go.opentelemetry.io/otel/oteltest v0.18.0 h1:FbKDFm/LnQDOHuGjED+fy3s5YMVg0z019GJ9Er66hYo=
16+
go.opentelemetry.io/otel/oteltest v0.18.0/go.mod h1:NyierCU3/G8DLTva7KRzGii2fdxdR89zXKH1bNWY7Bo=
17+
go.opentelemetry.io/otel/sdk v0.18.0 h1:/UiFHiJxJyEoUN2tQ6l+5f0/P01V0G9YuHeVarktRDw=
18+
go.opentelemetry.io/otel/sdk v0.18.0/go.mod h1:nT+UdAeGQWSeTnz9vY8BBq7SEGpmWAetyo/xHUcQvxo=
19+
go.opentelemetry.io/otel/trace v0.18.0 h1:ilCfc/fptVKaDMK1vWk0elxpolurJbEgey9J6g6s+wk=
20+
go.opentelemetry.io/otel/trace v0.18.0/go.mod h1:FzdUu3BPwZSZebfQ1vl5/tAa8LyMLXSJN57AXIt/iDk=
2121
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
2222
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2323
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

detectors/aws/eks/detector.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"strings"
2828
"time"
2929

30-
"go.opentelemetry.io/otel/label"
30+
"go.opentelemetry.io/otel/attribute"
3131
"go.opentelemetry.io/otel/sdk/resource"
3232
"go.opentelemetry.io/otel/semconv"
3333
)
@@ -88,28 +88,28 @@ func (detector *resourceDetector) Detect(ctx context.Context) (*resource.Resourc
8888
}
8989

9090
// Create variable to hold resource attributes
91-
labels := []label.KeyValue{}
91+
attributes := []attribute.KeyValue{}
9292

93-
// Get clusterName and append to labels
93+
// Get clusterName and append to attributes
9494
clusterName, err := getClusterName(detector.utils)
9595
if err != nil {
9696
return nil, err
9797
}
9898
if clusterName != "" {
99-
labels = append(labels, semconv.K8SClusterNameKey.String(clusterName))
99+
attributes = append(attributes, semconv.K8SClusterNameKey.String(clusterName))
100100
}
101101

102-
// Get containerID and append to labels
102+
// Get containerID and append to attributes
103103
containerID, err := detector.utils.getContainerID()
104104
if err != nil {
105105
return nil, err
106106
}
107107
if containerID != "" {
108-
labels = append(labels, semconv.ContainerIDKey.String(containerID))
108+
attributes = append(attributes, semconv.ContainerIDKey.String(containerID))
109109
}
110110

111111
// Return new resource object with clusterName and containerID as attributes
112-
return resource.NewWithAttributes(labels...), nil
112+
return resource.NewWithAttributes(attributes...), nil
113113

114114
}
115115

detectors/aws/eks/detector_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"github.com/stretchr/testify/mock"
2323
"github.com/stretchr/testify/require"
2424

25-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
2626
"go.opentelemetry.io/otel/sdk/resource"
2727
"go.opentelemetry.io/otel/semconv"
2828
)
@@ -62,7 +62,7 @@ func TestEks(t *testing.T) {
6262
detectorUtils.On("getContainerID").Return("0123456789A", nil)
6363

6464
// Expected resource object
65-
eksResourceLabels := []label.KeyValue{
65+
eksResourceLabels := []attribute.KeyValue{
6666
semconv.K8SClusterNameKey.String("my-cluster"),
6767
semconv.ContainerIDKey.String("0123456789A"),
6868
}

0 commit comments

Comments
 (0)