From d39dec2e8bfa1f96b2c168cb5f3a133be773c897 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Mon, 25 Apr 2022 10:50:20 -0700 Subject: [PATCH] Update CassKeyspace func Use the DBNameKey instead of the removed DBCassandraKeyspaceKey. This comes from https://github.com/open-telemetry/opentelemetry-specification/pull/1973 --- .../github.com/gocql/gocql/otelgocql/internal/cass.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instrumentation/github.com/gocql/gocql/otelgocql/internal/cass.go b/instrumentation/github.com/gocql/gocql/otelgocql/internal/cass.go index 6baf219240e..754c2eccb62 100644 --- a/instrumentation/github.com/gocql/gocql/otelgocql/internal/cass.go +++ b/instrumentation/github.com/gocql/gocql/otelgocql/internal/cass.go @@ -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 ( @@ -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