Skip to content

refactor(docker-tests): replace SpanAttributes with semconv attributes#4339

Merged
xrmx merged 7 commits intoopen-telemetry:mainfrom
RiyaChaturvedi37:fix/docker-tests-v4
Mar 19, 2026
Merged

refactor(docker-tests): replace SpanAttributes with semconv attributes#4339
xrmx merged 7 commits intoopen-telemetry:mainfrom
RiyaChaturvedi37:fix/docker-tests-v4

Conversation

@RiyaChaturvedi37
Copy link
Copy Markdown
Contributor

Refs #3475

Description

Replaces usage of deprecated SpanAttributes from opentelemetry.semconv.trace
with the preferred imports from opentelemetry.semconv._incubating.attributes
in the docker-tests package.

Files changed:

  • tests/asyncpg/test_asyncpg_functional.py
  • tests/celery/test_celery_functional.py
  • tests/mysql/test_mysql_functional.py
  • tests/postgres/test_aiopg_functional.py
  • tests/postgres/test_psycopg_functional.py
  • tests/pymongo/test_pymongo_functional.py
  • tests/pymysql/test_pymysql_functional.py
  • tests/redis/test_redis_functional.py
  • tests/sqlalchemy_tests/mixins.py
  • tests/sqlalchemy_tests/test_mssql.py
  • tests/sqlalchemy_tests/test_mysql.py
  • tests/sqlalchemy_tests/test_postgres.py
  • tests/sqlalchemy_tests/test_sqlite.py

Type of change

  • Refactoring (no functional changes)

@xrmx xrmx moved this to Easy to review / merge / close in Python PR digest Mar 18, 2026
Comment thread CHANGELOG.md Outdated
@xrmx xrmx moved this from Easy to review / merge / close to Approved PRs in Python PR digest Mar 19, 2026
@xrmx xrmx enabled auto-merge (squash) March 19, 2026 10:10
@xrmx xrmx mentioned this pull request Mar 19, 2026
42 tasks
@xrmx xrmx merged commit 10339b6 into open-telemetry:main Mar 19, 2026
859 of 860 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Mar 19, 2026
123liuziming added a commit to 123liuziming/opentelemetry-python-contrib that referenced this pull request Mar 30, 2026
…tests-cleanup

Revert docker-test formatting changes that undo merged open-telemetry#4339 cleanup
xrmx added a commit that referenced this pull request Apr 20, 2026
…rios. (#4341)

* Initial plan

* Clean up _ENVIRON_ACTIVATION_KEY and _ENVIRON_TOKEN in _teardown_request to prevent duplicate execution

Add a finally block in _teardown_request to pop _ENVIRON_ACTIVATION_KEY and
_ENVIRON_TOKEN from flask.request.environ after teardown completes. This
prevents issues when _teardown_request is called multiple times, as the
second call will see activation as None and return early.

Co-authored-by: 123liuziming <[email protected]>

* Improve test to explicitly verify duplicate teardown calls don't cause errors

Co-authored-by: 123liuziming <[email protected]>

* fix lint

Change-Id: Iea7711d86dcd6f4da7a3af92cb68db2fe3db345f
Co-developed-by: Cursor <[email protected]>

* polish CHANGELOG

Change-Id: Ie89cac244ade8d04768503112db8673f91d81756
Co-developed-by: Cursor <[email protected]>

* Refactor request teardown to avoid duplicate cleanup

Remove redundant environment variable cleanup in finally block.

* Update test_flask_compatibility.py

* Uncomment FlaskInstrumentor import in test file

* Initial plan

* Fix ruff format errors in docker test files

Co-authored-by: 123liuziming <[email protected]>
Agent-Logs-Url: https://github.com/123liuziming/opentelemetry-python-contrib/sessions/9165702c-5648-474d-9291-dfa57008b0b6

* Initial plan

* Revert docker-test formatting changes that undo merged #4339 cleanup

Agent-Logs-Url: https://github.com/123liuziming/opentelemetry-python-contrib/sessions/25f73137-1606-4050-b879-ffc01d7ab803

Co-authored-by: 123liuziming <[email protected]>

* Update CHANGELOG.md

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Emídio Neto <[email protected]>
Co-authored-by: Mike Goldsmith <[email protected]>
Co-authored-by: Riccardo Magliocchetti <[email protected]>
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.

2 participants