@@ -143,12 +143,16 @@ func TestNewClientTracingEnabled(t *testing.T) {
143
143
defer close ()
144
144
145
145
var attrString string
146
- client , err := NewClient ("package.Client" , "v1.0.0" , runtime.PipelineOptions {TracingNamespace : "Widget.Factory" }, & policy.ClientOptions {
146
+ client , err := NewClient ("package.Client" , "v1.0.0" , runtime.PipelineOptions {
147
+ Tracing : runtime.TracingOptions {
148
+ Namespace : "Widget.Factory" ,
149
+ },
150
+ }, & policy.ClientOptions {
147
151
TracingProvider : tracing .NewProvider (func (name , version string ) tracing.Tracer {
148
152
return tracing .NewTracer (func (ctx context.Context , spanName string , options * tracing.SpanOptions ) (context.Context , tracing.Span ) {
149
153
require .NotNil (t , options )
150
154
for _ , attr := range options .Attributes {
151
- if attr .Key == "az.namespace" {
155
+ if attr .Key == shared . TracingNamespaceAttrName {
152
156
v , ok := attr .Value .(string )
153
157
require .True (t , ok )
154
158
attrString = attr .Key + ":" + v
@@ -180,14 +184,18 @@ func TestClientWithClientName(t *testing.T) {
180
184
var clientName string
181
185
var modVersion string
182
186
var attrString string
183
- client , err := NewClient ("module/package.Client" , "v1.0.0" , runtime.PipelineOptions {TracingNamespace : "Widget.Factory" }, & policy.ClientOptions {
187
+ client , err := NewClient ("module/package.Client" , "v1.0.0" , runtime.PipelineOptions {
188
+ Tracing : runtime.TracingOptions {
189
+ Namespace : "Widget.Factory" ,
190
+ },
191
+ }, & policy.ClientOptions {
184
192
TracingProvider : tracing .NewProvider (func (name , version string ) tracing.Tracer {
185
193
clientName = name
186
194
modVersion = version
187
195
return tracing .NewTracer (func (ctx context.Context , spanName string , options * tracing.SpanOptions ) (context.Context , tracing.Span ) {
188
196
require .NotNil (t , options )
189
197
for _ , attr := range options .Attributes {
190
- if attr .Key == "az.namespace" {
198
+ if attr .Key == shared . TracingNamespaceAttrName {
191
199
v , ok := attr .Value .(string )
192
200
require .True (t , ok )
193
201
attrString = attr .Key + ":" + v
0 commit comments