Skip to content

Commit

Permalink
Update CassKeyspace func
Browse files Browse the repository at this point in the history
Use the DBNameKey instead of the removed DBCassandraKeyspaceKey. This
comes from
open-telemetry/opentelemetry-specification#1973
  • Loading branch information
MrAlias committed Apr 25, 2022
1 parent 9acd065 commit d39dec2
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -19,7 +19,7 @@ import (
"net"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
semconv "go.opentelemetry.io/otel/semconv/v1.10.0"
)

const (
Expand Down Expand Up @@ -127,9 +127,9 @@ func CassConnectOperation() attribute.KeyValue {
}

// CassKeyspace returns the keyspace of the session as
// a semconv KeyValue pair (db.cassandra.keyspace).
// a semconv KeyValue pair (db.name).
func CassKeyspace(keyspace string) attribute.KeyValue {
return semconv.DBCassandraKeyspaceKey.String(keyspace)
return semconv.DBNameKey.String(keyspace)
}

// CassBatchQueries returns the number of queries in a batch query
Expand Down

0 comments on commit d39dec2

Please sign in to comment.