@@ -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
8383func (aws * AWS ) client () (client , error ) {
@@ -94,15 +94,15 @@ func (aws *AWS) client() (client, error) {
9494}
9595
9696type 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
0 commit comments