Skip to content

DB and HTTP semantic convention stability migration for Redis instrumentation#4370

Merged
lzchen merged 31 commits into
open-telemetry:mainfrom
tammy-baylis-swi:redis-semconv-opt-in
May 12, 2026
Merged

DB and HTTP semantic convention stability migration for Redis instrumentation#4370
lzchen merged 31 commits into
open-telemetry:mainfrom
tammy-baylis-swi:redis-semconv-opt-in

Conversation

@tammy-baylis-swi

@tammy-baylis-swi tammy-baylis-swi commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

Add Redis instrumentor support for when OTEL_SEMCONV_STABILITY_OPT_IN includes

  • "database" or "database/dup"
  • "http" or "http/dup"

EDIT: This uses now-merged updates from SQLAlchemy PR, no conflicts 🙂 This duplicates all _semconv helper updates in #4110 at 02adc40

Fixes #2930, #2885

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Added unit tests

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • 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
  • Documentation has been updated

Comment thread instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt Outdated

@MikeGoldsmith MikeGoldsmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks @tammy-baylis-swi.

Left some queries about some semconv keys and a couple of suggestions.

Comment thread instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py Outdated
@tammy-baylis-swi tammy-baylis-swi moved this from Ready for review to Reviewed PRs that need fixes in Python PR digest Apr 23, 2026
Comment thread instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt Outdated
@tammy-baylis-swi

Copy link
Copy Markdown
Contributor Author

Please pardon my delay in addressing your feedback @emdneto and @MikeGoldsmith ! Please could you take another pass through this one for Redis instrumentation and semconv opt-in.

Current CI/CD failures for precommit "rstcheck" seem unrelated and present in other PRs:

rstcheck.................................................................Failed
- hook id: rstcheck
- exit code: 1

_template/autodoc_entry.rst:1: (SEVERE/4) File referenced in "include" directive not found: '../../../instrumentation/opentelemetry-instrumentation-<REPLACE ME>/README.rst'.

@emdneto

emdneto commented May 5, 2026

Copy link
Copy Markdown
Member

Please pardon my delay in addressing your feedback @emdneto and @MikeGoldsmith ! Please could you take another pass through this one for Redis instrumentation and semconv opt-in.

Current CI/CD failures for precommit "rstcheck" seem unrelated and present in other PRs:

rstcheck.................................................................Failed
- hook id: rstcheck
- exit code: 1

_template/autodoc_entry.rst:1: (SEVERE/4) File referenced in "include" directive not found: '../../../instrumentation/opentelemetry-instrumentation-<REPLACE ME>/README.rst'.

Np. I realized I left a pending review since last month 😅 Looking into the rstcheck error

Comment thread instrumentation/opentelemetry-instrumentation-redis/tests/test_redis.py Outdated
@tammy-baylis-swi tammy-baylis-swi requested a review from lzchen May 12, 2026 01:54
@tammy-baylis-swi tammy-baylis-swi moved this from Reviewed PRs that need fixes to Ready for review in Python PR digest May 12, 2026
@lzchen

lzchen commented May 12, 2026

Copy link
Copy Markdown
Contributor

@tammy-baylis-swi

If you can resolve the above discussions we can merge :)

@tammy-baylis-swi tammy-baylis-swi moved this from Ready for review to Approved PRs in Python PR digest May 12, 2026
@tammy-baylis-swi

Copy link
Copy Markdown
Contributor Author

If you can resolve the above discussions we can merge :)

@lzchen done!

@lzchen lzchen enabled auto-merge (squash) May 12, 2026 16:18
@lzchen lzchen merged commit 0059b27 into open-telemetry:main May 12, 2026
752 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest May 12, 2026
@sightseeker sightseeker mentioned this pull request May 13, 2026
10 tasks
sightseeker added a commit to sightseeker/opentelemetry-python-contrib that referenced this pull request Jun 23, 2026
Migrate the Valkey instrumentation (and the shared redis-valkey-base
helpers) to support the new stable DB and HTTP semantic conventions
via OTEL_SEMCONV_STABILITY_OPT_IN, mirroring what was done for Redis
in open-telemetry#4370.

- redis-valkey-base: switch helpers to use _semconv stability helpers
  (_set_db_system, _set_db_statement, _set_db_redis_database_index,
  _set_http_net_peer_name_client, _set_http_peer_port_client,
  _set_net_transport) and resolve schema_url via signal-type opt-in
- valkey: drop hardcoded attribute keys from KVStoreConfig, mark
  package as semconv migration, switch tracer schema_url to the
  stability-aware helper
- tests: cover default / database / database/dup / http / http/dup
  stability modes for db.system, db.statement and connection attrs
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.

opentelemetry-instrumentation-redis: semantic convention stability migration

4 participants