Skip to content

Commit

Permalink
contrib/gocql/gocql: report readable consistency instead of int (Data…
Browse files Browse the repository at this point in the history
  • Loading branch information
ufoot authored and mingrammer committed Dec 22, 2020
1 parent ecc900f commit ad0a37d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contrib/gocql/gocql/gocql.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (tq *Query) Iter() *Iter {
span := tq.newChildSpan(tq.traceContext)
iter := tq.Query.Iter()
span.SetTag(ext.CassandraRowCount, strconv.Itoa(iter.NumRows()))
span.SetTag(ext.CassandraConsistencyLevel, strconv.Itoa(int(tq.GetConsistency())))
span.SetTag(ext.CassandraConsistencyLevel, tq.GetConsistency().String())

columns := iter.Columns()
if len(columns) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion contrib/gocql/gocql/gocql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestErrorWrapper(t *testing.T) {
assert.Equal(span.OperationName(), ext.CassandraQuery)
assert.Equal(span.Tag(ext.ResourceName), "CREATE KEYSPACE")
assert.Equal(span.Tag(ext.ServiceName), "ServiceName")
assert.Equal(span.Tag(ext.CassandraConsistencyLevel), "4")
assert.Equal(span.Tag(ext.CassandraConsistencyLevel), "QUORUM")
assert.Equal(span.Tag(ext.CassandraPaginated), "false")

if iter.Host() != nil {
Expand Down

0 comments on commit ad0a37d

Please sign in to comment.