We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f45f6d commit 0b8240fCopy full SHA for 0b8240f
contrib/gocql/gocql/gocql.go
@@ -56,14 +56,9 @@ func WrapQuery(q *gocql.Query, opts ...WrapOption) *Query {
56
fn(cfg)
57
}
58
if cfg.resourceName == "" {
59
- q := `"` + strings.SplitN(q.String(), "\"", 3)[1] + `"`
60
- q, err := strconv.Unquote(q)
61
- if err != nil {
62
- // avoid having an empty resource as it will cause the trace
63
- // to be dropped.
64
- q = "_"
+ if parts := strings.SplitN(q.String(), "\"", 3); len(parts) == 3 {
+ cfg.resourceName = parts[1]
65
66
- cfg.resourceName = q
67
68
tq := &Query{q, ¶ms{config: cfg}, context.Background()}
69
return tq
0 commit comments