Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove db.name attribute from Redis instrumentation #1427

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
- `opentelemetry-instrumentation-dbapi` Fix the check for the connection already being instrumented in instrument_connection().
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
- Remove db.name attribute from Redis instrumentation
([#1427](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1427))

## Version 1.14.0/0.35b0 (2022-11-03)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _extract_conn_attributes(conn_kwargs):
SpanAttributes.DB_SYSTEM: DbSystemValues.REDIS.value,
}
db = conn_kwargs.get("db", 0)
attributes[SpanAttributes.DB_NAME] = db
attributes[SpanAttributes.DB_REDIS_DATABASE_INDEX] = db
try:
attributes[SpanAttributes.NET_PEER_NAME] = conn_kwargs.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def tearDown(self):
def _check_span(self, span, name):
self.assertEqual(span.name, name)
self.assertIs(span.status.status_code, trace.StatusCode.UNSET)
self.assertEqual(span.attributes.get(SpanAttributes.DB_NAME), 0)
luke6Lh43 marked this conversation as resolved.
Show resolved Hide resolved
self.assertEqual(
span.attributes.get(SpanAttributes.DB_REDIS_DATABASE_INDEX), 0
)
self.assertEqual(
span.attributes[SpanAttributes.NET_PEER_NAME], "localhost"
)
Expand Down Expand Up @@ -209,7 +211,9 @@ def tearDown(self):
def _check_span(self, span, name):
self.assertEqual(span.name, name)
self.assertIs(span.status.status_code, trace.StatusCode.UNSET)
self.assertEqual(span.attributes.get(SpanAttributes.DB_NAME), 0)
luke6Lh43 marked this conversation as resolved.
Show resolved Hide resolved
self.assertEqual(
span.attributes.get(SpanAttributes.DB_REDIS_DATABASE_INDEX), 0
)
self.assertEqual(
span.attributes[SpanAttributes.NET_PEER_NAME], "localhost"
)
Expand Down