Skip to content

Commit ce809f0

Browse files
committed
Update opentelemetry library
1 parent 0044542 commit ce809f0

18 files changed

+226
-186
lines changed

controllers/azurecluster_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"context"
2121
"time"
2222

23-
"go.opentelemetry.io/otel/api/trace"
24-
"go.opentelemetry.io/otel/label"
23+
"go.opentelemetry.io/otel/attribute"
24+
"go.opentelemetry.io/otel/trace"
2525
corev1 "k8s.io/api/core/v1"
2626

2727
"github.com/go-logr/logr"
@@ -114,9 +114,9 @@ func (r *AzureClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request
114114

115115
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureClusterReconciler.Reconcile",
116116
trace.WithAttributes(
117-
label.String("namespace", req.Namespace),
118-
label.String("name", req.Name),
119-
label.String("kind", "AzureCluster"),
117+
attribute.String("namespace", req.Namespace),
118+
attribute.String("name", req.Name),
119+
attribute.String("kind", "AzureCluster"),
120120
))
121121
defer span.End()
122122

controllers/azureidentity_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
aadpodv1 "github.com/Azure/aad-pod-identity/pkg/apis/aadpodidentity/v1"
2424
"github.com/go-logr/logr"
2525
"github.com/pkg/errors"
26-
"go.opentelemetry.io/otel/api/trace"
27-
"go.opentelemetry.io/otel/label"
26+
"go.opentelemetry.io/otel/attribute"
27+
"go.opentelemetry.io/otel/trace"
2828
corev1 "k8s.io/api/core/v1"
2929
apierrors "k8s.io/apimachinery/pkg/api/errors"
3030
"k8s.io/client-go/tools/record"
@@ -90,9 +90,9 @@ func (r *AzureIdentityReconciler) Reconcile(ctx context.Context, req ctrl.Reques
9090

9191
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureIdentityReconciler.Reconcile",
9292
trace.WithAttributes(
93-
label.String("namespace", req.Namespace),
94-
label.String("name", req.Name),
95-
label.String("kind", "AzureCluster"),
93+
attribute.String("namespace", req.Namespace),
94+
attribute.String("name", req.Name),
95+
attribute.String("kind", "AzureCluster"),
9696
))
9797
defer span.End()
9898

controllers/azurejson_machine_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
corev1 "k8s.io/api/core/v1"
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -102,9 +102,9 @@ func (r *AzureJSONMachineReconciler) Reconcile(ctx context.Context, req ctrl.Req
102102

103103
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureJSONMachineReconciler.Reconcile",
104104
trace.WithAttributes(
105-
label.String("namespace", req.Namespace),
106-
label.String("name", req.Name),
107-
label.String("kind", "AzureMachine"),
105+
attribute.String("namespace", req.Namespace),
106+
attribute.String("name", req.Name),
107+
attribute.String("kind", "AzureMachine"),
108108
))
109109
defer span.End()
110110

controllers/azurejson_machinepool_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
corev1 "k8s.io/api/core/v1"
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -66,9 +66,9 @@ func (r *AzureJSONMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl
6666

6767
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureJSONMachinePoolReconciler.Reconcile",
6868
trace.WithAttributes(
69-
label.String("namespace", req.Namespace),
70-
label.String("name", req.Name),
71-
label.String("kind", "AzureMachinePool"),
69+
attribute.String("namespace", req.Namespace),
70+
attribute.String("name", req.Name),
71+
attribute.String("kind", "AzureMachinePool"),
7272
))
7373
defer span.End()
7474

controllers/azurejson_machinetemplate_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
corev1 "k8s.io/api/core/v1"
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -67,9 +67,9 @@ func (r *AzureJSONTemplateReconciler) Reconcile(ctx context.Context, req ctrl.Re
6767

6868
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureJSONTemplateReconciler.Reconcile",
6969
trace.WithAttributes(
70-
label.String("namespace", req.Namespace),
71-
label.String("name", req.Name),
72-
label.String("kind", "AzureMachineTemplate"),
70+
attribute.String("namespace", req.Namespace),
71+
attribute.String("name", req.Name),
72+
attribute.String("kind", "AzureMachineTemplate"),
7373
))
7474
defer span.End()
7575

controllers/azuremachine_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
corev1 "k8s.io/api/core/v1"
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
"k8s.io/client-go/tools/record"
@@ -134,9 +134,9 @@ func (r *AzureMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request
134134

135135
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureMachineReconciler.Reconcile",
136136
trace.WithAttributes(
137-
label.String("namespace", req.Namespace),
138-
label.String("name", req.Name),
139-
label.String("kind", "AzureMachine"),
137+
attribute.String("namespace", req.Namespace),
138+
attribute.String("name", req.Name),
139+
attribute.String("kind", "AzureMachine"),
140140
))
141141
defer span.End()
142142

docs/book/src/developers/development.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ Here is an example of staring a span in the beginning of a controller reconcile.
339339
```go
340340
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureMachineReconciler.Reconcile",
341341
trace.WithAttributes(
342-
label.String("namespace", req.Namespace),
343-
label.String("name", req.Name),
344-
label.String("kind", "AzureMachine"),
342+
attribute.String("namespace", req.Namespace),
343+
attribute.String("name", req.Name),
344+
attribute.String("kind", "AzureMachine"),
345345
))
346346
defer span.End()
347347
```

exp/controllers/azuremachinepool_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
corev1 "k8s.io/api/core/v1"
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
"k8s.io/apimachinery/pkg/runtime"
@@ -165,9 +165,9 @@ func (ampr *AzureMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.
165165

166166
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureMachinePoolReconciler.Reconcile",
167167
trace.WithAttributes(
168-
label.String("namespace", req.Namespace),
169-
label.String("name", req.Name),
170-
label.String("kind", "AzureMachinePool"),
168+
attribute.String("namespace", req.Namespace),
169+
attribute.String("name", req.Name),
170+
attribute.String("kind", "AzureMachinePool"),
171171
))
172172
defer span.End()
173173

exp/controllers/azuremachinepoolmachine_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323

2424
"github.com/go-logr/logr"
2525
"github.com/pkg/errors"
26-
"go.opentelemetry.io/otel/api/trace"
27-
"go.opentelemetry.io/otel/label"
26+
"go.opentelemetry.io/otel/attribute"
27+
"go.opentelemetry.io/otel/trace"
2828
corev1 "k8s.io/api/core/v1"
2929
apierrors "k8s.io/apimachinery/pkg/api/errors"
3030
"k8s.io/apimachinery/pkg/runtime"
@@ -133,9 +133,9 @@ func (ampmr *AzureMachinePoolMachineController) Reconcile(ctx context.Context, r
133133

134134
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureMachinePoolMachineController.Reconcile",
135135
trace.WithAttributes(
136-
label.String("namespace", req.Namespace),
137-
label.String("name", req.Name),
138-
label.String("kind", "AzureMachinePoolMachine"),
136+
attribute.String("namespace", req.Namespace),
137+
attribute.String("name", req.Name),
138+
attribute.String("kind", "AzureMachinePoolMachine"),
139139
))
140140
defer span.End()
141141

exp/controllers/azuremanagedcluster_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222

2323
"github.com/go-logr/logr"
2424
"github.com/pkg/errors"
25-
"go.opentelemetry.io/otel/api/trace"
26-
"go.opentelemetry.io/otel/label"
25+
"go.opentelemetry.io/otel/attribute"
26+
"go.opentelemetry.io/otel/trace"
2727
apierrors "k8s.io/apimachinery/pkg/api/errors"
2828
"k8s.io/apimachinery/pkg/types"
2929
"k8s.io/client-go/tools/record"
@@ -102,9 +102,9 @@ func (r *AzureManagedClusterReconciler) Reconcile(ctx context.Context, req ctrl.
102102

103103
ctx, span := tele.Tracer().Start(ctx, "controllers.AzureManagedClusterReconciler.Reconcile",
104104
trace.WithAttributes(
105-
label.String("namespace", req.Namespace),
106-
label.String("name", req.Name),
107-
label.String("kind", "AzureManagedCluster"),
105+
attribute.String("namespace", req.Namespace),
106+
attribute.String("name", req.Name),
107+
attribute.String("kind", "AzureManagedCluster"),
108108
))
109109
defer span.End()
110110

0 commit comments

Comments
 (0)