Skip to content

fix(instr-redis): don't fail commands when connection pool lacks connection_kwargs#4782

Merged
xrmx merged 2 commits into
open-telemetry:mainfrom
JamieDanielson:redis-cluster-connection-kwargs-guard
Jul 10, 2026
Merged

fix(instr-redis): don't fail commands when connection pool lacks connection_kwargs#4782
xrmx merged 2 commits into
open-telemetry:mainfrom
JamieDanielson:redis-cluster-connection-kwargs-guard

Conversation

@JamieDanielson

Copy link
Copy Markdown
Member

Description

Redis cluster clients can expose a connection_pool object that doesn't have connection_kwargs. Current instrumentation only checked for existence of connection_pool and would raise an AttributeError if connection_kwargs didn't exist. This change checks for the existence of connection_kwargs and skips adding those attributes if they are not available.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Sync and async tests asserting command completes, span status is UNSET, and no exception is recorded

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • [n/a] Documentation has been updated

@JamieDanielson JamieDanielson requested a review from a team as a code owner July 8, 2026 22:10
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest Jul 9, 2026
@MikeGoldsmith MikeGoldsmith moved this to Approved PRs in Python PR digest Jul 9, 2026
@xrmx xrmx added this pull request to the merge queue Jul 10, 2026
Merged via the queue into open-telemetry:main with commit 0b18339 Jul 10, 2026
760 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants