File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis
tests/opentelemetry-docker-tests/tests/redis Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424 ([ #1424 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424 ) )
2525- ` opentelemetry-instrumentation-dbapi ` Fix the check for the connection already being instrumented in instrument_connection().
2626 ([ #1424 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424 ) )
27+ - Remove db.name attribute from Redis instrumentation
28+ ([ #1427 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1427 ) )
2729
2830## Version 1.14.0/0.35b0 (2022-11-03)
2931
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ def _extract_conn_attributes(conn_kwargs):
2828 SpanAttributes .DB_SYSTEM : DbSystemValues .REDIS .value ,
2929 }
3030 db = conn_kwargs .get ("db" , 0 )
31- attributes [SpanAttributes .DB_NAME ] = db
3231 attributes [SpanAttributes .DB_REDIS_DATABASE_INDEX ] = db
3332 try :
3433 attributes [SpanAttributes .NET_PEER_NAME ] = conn_kwargs .get (
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ def tearDown(self):
3737 def _check_span (self , span , name ):
3838 self .assertEqual (span .name , name )
3939 self .assertIs (span .status .status_code , trace .StatusCode .UNSET )
40- self .assertEqual (span .attributes .get (SpanAttributes .DB_NAME ), 0 )
40+ self .assertEqual (
41+ span .attributes .get (SpanAttributes .DB_REDIS_DATABASE_INDEX ), 0
42+ )
4143 self .assertEqual (
4244 span .attributes [SpanAttributes .NET_PEER_NAME ], "localhost"
4345 )
@@ -209,7 +211,9 @@ def tearDown(self):
209211 def _check_span (self , span , name ):
210212 self .assertEqual (span .name , name )
211213 self .assertIs (span .status .status_code , trace .StatusCode .UNSET )
212- self .assertEqual (span .attributes .get (SpanAttributes .DB_NAME ), 0 )
214+ self .assertEqual (
215+ span .attributes .get (SpanAttributes .DB_REDIS_DATABASE_INDEX ), 0
216+ )
213217 self .assertEqual (
214218 span .attributes [SpanAttributes .NET_PEER_NAME ], "localhost"
215219 )
You can’t perform that action at this time.
0 commit comments