Skip to content

Commit 71308a3

Browse files
committed
.
1 parent e9ec242 commit 71308a3

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

tests/integrations/redis/asyncio/test_redis_asyncio.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ async def test_async_redis_pipeline(
8181
attrs = pipeline_span["attributes"]
8282
assert attrs["sentry.op"] == "db.redis"
8383
assert attrs["db.system.name"] == "redis-py"
84+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
8485
assert attrs["db.namespace"] == "0"
8586
assert attrs[SPANDATA.SERVER_ADDRESS] == (
8687
connection.connection_pool.connection_kwargs.get("host")

tests/integrations/redis/cluster/test_redis_cluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def test_rediscluster_basic(
9898
attrs = span["attributes"]
9999
assert attrs["sentry.op"] == "db.redis"
100100
assert attrs["db.system.name"] == "redis-py"
101+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
101102
# ClusterNode converts localhost to 127.0.0.1
102103
assert attrs[SPANDATA.SERVER_ADDRESS] == "127.0.0.1"
103104
assert attrs[SPANDATA.SERVER_PORT] == 6379
@@ -184,6 +185,7 @@ def test_rediscluster_pipeline(
184185
attrs = pipeline_span["attributes"]
185186
assert attrs["sentry.op"] == "db.redis"
186187
assert attrs["db.system.name"] == "redis-py"
188+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
187189
# ClusterNode converts localhost to 127.0.0.1
188190
assert attrs[SPANDATA.SERVER_ADDRESS] == "127.0.0.1"
189191
assert attrs[SPANDATA.SERVER_PORT] == 6379

tests/integrations/redis/cluster_asyncio/test_redis_cluster_asyncio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ async def test_async_basic(
102102
attrs = redis_span["attributes"]
103103
assert attrs["sentry.op"] == "db.redis"
104104
assert attrs["db.system.name"] == "redis-py"
105+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
105106
assert attrs[SPANDATA.SERVER_ADDRESS] == "127.0.0.1"
106107
assert attrs[SPANDATA.SERVER_PORT] == 6379
107108
assert attrs["db.operation.name"] == "SET"
@@ -175,6 +176,7 @@ async def test_async_redis_pipeline(
175176
attrs = pipeline_span["attributes"]
176177
assert attrs["sentry.op"] == "db.redis"
177178
assert attrs["db.system.name"] == "redis-py"
179+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
178180
assert attrs[SPANDATA.SERVER_ADDRESS] == "127.0.0.1"
179181
assert attrs[SPANDATA.SERVER_PORT] == 6379
180182
else:

tests/integrations/redis/test_redis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_redis_pipeline(
8888
assert pipeline_span["name"] == "redis.pipeline.execute"
8989
assert pipeline_span["attributes"]["sentry.op"] == "db.redis"
9090
assert pipeline_span["attributes"]["sentry.origin"] == "auto.db.redis"
91-
assert pipeline_span["attributes"]["db.system.name"] == "redis-py"
91+
assert pipeline_span["attributes"]["db.system.name"] == "redis"
9292
else:
9393
events = capture_events()
9494
with start_transaction():
@@ -402,7 +402,7 @@ def test_db_connection_attributes_client(
402402
assert redis_span["name"] == "GET 'foobar'"
403403
attrs = redis_span["attributes"]
404404
assert attrs["sentry.op"] == "db.redis"
405-
assert attrs["db.system.name"] == "redis-py"
405+
assert attrs["db.system.name"] == "redis"
406406
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
407407
assert attrs["db.namespace"] == "1"
408408
assert attrs[SPANDATA.SERVER_ADDRESS] == "localhost"
@@ -453,8 +453,8 @@ def test_db_connection_attributes_pipeline(
453453
assert pipeline_span["name"] == "redis.pipeline.execute"
454454
attrs = pipeline_span["attributes"]
455455
assert attrs["sentry.op"] == "db.redis"
456-
assert attrs["db.system.name"] == "redis-py"
457-
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis"
456+
assert attrs["db.system.name"] == "redis"
457+
assert attrs[SPANDATA.DB_DRIVER_NAME] == "redis-py"
458458
assert attrs["db.namespace"] == "1"
459459
assert attrs[SPANDATA.SERVER_ADDRESS] == "localhost"
460460
assert attrs[SPANDATA.SERVER_PORT] == 63791

0 commit comments

Comments
 (0)