diff --git a/google/cloud/spanner_v1/_opentelemetry_tracing.py b/google/cloud/spanner_v1/_opentelemetry_tracing.py index 346ed400c0..6ec353cdf2 100644 --- a/google/cloud/spanner_v1/_opentelemetry_tracing.py +++ b/google/cloud/spanner_v1/_opentelemetry_tracing.py @@ -59,7 +59,7 @@ def trace_call(name, session, extra_attributes=None): # Set base attributes that we know for every trace created attributes = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: SpannerClient.DEFAULT_ENDPOINT, DB_NAME: session._database.name, NET_HOST_NAME: SpannerClient.DEFAULT_ENDPOINT, diff --git a/tests/system/test_session_api.py b/tests/system/test_session_api.py index 8e7760ebc6..89e4b1d02c 100644 --- a/tests/system/test_session_api.py +++ b/tests/system/test_session_api.py @@ -341,7 +341,7 @@ def assert_span_attributes( def _make_attributes(db_instance, **kwargs): attributes = { - ot_helpers.DB_SYSTEM: "google.cloud.spanner", + ot_helpers.DB_SYSTEM: "spanner", ot_helpers.DB_CONNECTION_STRING: "spanner.googleapis.com", ot_helpers.DB_NAME: db_instance, ot_helpers.NET_HOST_NAME: "spanner.googleapis.com", diff --git a/tests/unit/test__opentelemetry_tracing.py b/tests/unit/test__opentelemetry_tracing.py index a9a4ac0caf..d9ed656b58 100644 --- a/tests/unit/test__opentelemetry_tracing.py +++ b/tests/unit/test__opentelemetry_tracing.py @@ -63,7 +63,7 @@ def test_trace_call(self): } expected_attributes = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", NET_HOST_NAME: "spanner.googleapis.com", } @@ -88,7 +88,7 @@ def test_trace_error(self): extra_attributes = {DB_NAME: "database_name"} expected_attributes = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", NET_HOST_NAME: "spanner.googleapis.com", } @@ -115,7 +115,7 @@ def test_trace_grpc_error(self): extra_attributes = {DB_NAME: "database_name"} expected_attributes = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", NET_HOST_NAME: "spanner.googleapis.com", } @@ -139,7 +139,7 @@ def test_trace_codeless_error(self): extra_attributes = {DB_NAME: "database_name"} expected_attributes = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", NET_HOST_NAME: "spanner.googleapis.com", } diff --git a/tests/unit/test_batch.py b/tests/unit/test_batch.py index 85f0bb2aed..f675094f57 100644 --- a/tests/unit/test_batch.py +++ b/tests/unit/test_batch.py @@ -31,7 +31,7 @@ ["bharney@example.com", "Bharney", "Rhubble", 31], ] BASE_ATTRIBUTES = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: "testing", NET_HOST_NAME: "spanner.googleapis.com", diff --git a/tests/unit/test_session.py b/tests/unit/test_session.py index c4532caa20..d47669ac2e 100644 --- a/tests/unit/test_session.py +++ b/tests/unit/test_session.py @@ -50,7 +50,7 @@ class TestSession(OpenTelemetryBase): SESSION_NAME = DATABASE_NAME + "/sessions/" + SESSION_ID DATABASE_ROLE = "dummy-role" BASE_ATTRIBUTES = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: DATABASE_NAME, NET_HOST_NAME: "spanner.googleapis.com", diff --git a/tests/unit/test_snapshot.py b/tests/unit/test_snapshot.py index e4919766b3..d810bc9fae 100644 --- a/tests/unit/test_snapshot.py +++ b/tests/unit/test_snapshot.py @@ -47,7 +47,7 @@ SECONDS = 3 MICROS = 123456 BASE_ATTRIBUTES = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: "testing", NET_HOST_NAME: "spanner.googleapis.com", @@ -537,7 +537,7 @@ def test_iteration_w_multiple_span_creation(self): self.assertEqual( dict(span.attributes), { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: "testing", NET_HOST_NAME: "spanner.googleapis.com", diff --git a/tests/unit/test_spanner.py b/tests/unit/test_spanner.py index a8d0969802..4625d53b08 100644 --- a/tests/unit/test_spanner.py +++ b/tests/unit/test_spanner.py @@ -116,7 +116,7 @@ class TestTransaction(OpenTelemetryBase): TRANSACTION_TAG = "transaction-tag" BASE_ATTRIBUTES = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: "testing", NET_HOST_NAME: "spanner.googleapis.com", diff --git a/tests/unit/test_transaction.py b/tests/unit/test_transaction.py index 589822a9f6..a7867f083e 100644 --- a/tests/unit/test_transaction.py +++ b/tests/unit/test_transaction.py @@ -60,7 +60,7 @@ class TestTransaction(OpenTelemetryBase): TRANSACTION_TAG = "transaction-tag" BASE_ATTRIBUTES = { - DB_SYSTEM: "google.cloud.spanner", + DB_SYSTEM: "spanner", DB_CONNECTION_STRING: "spanner.googleapis.com", DB_NAME: "testing", NET_HOST_NAME: "spanner.googleapis.com",