spanner: add struct keys to trace attributes
@@ -52,15 +52,15 @@ func tracePrintf(ctx context.Context, attrMap map[string]interface{}, format str
var a trace.Attribute
switch v := v.(type) {
case string:
- a = trace.StringAttribute{k, v}
+ a = trace.StringAttribute{Key: k, Value: v}
case bool:
- a = trace.BoolAttribute{k, v}
+ a = trace.BoolAttribute{Key: k, Value: v}
case int:
- a = trace.Int64Attribute{k, int64(v)}
+ a = trace.Int64Attribute{Key: k, Value: int64(v)}
case int64:
- a = trace.Int64Attribute{k, v}
+ a = trace.Int64Attribute{Key: k, Value: v}
default:
- a = trace.StringAttribute{k, fmt.Sprintf("%#v", v)}
+ a = trace.StringAttribute{Key: k, Value: fmt.Sprintf("%#v", v)}
}
attrs = append(attrs, a)
}
