SIGN IN SIGN UP

fix(pymssql): Complete semconv stability migration for attributes set in wrapped_connection (#4592)

* fix(pymssql): use semconv helpers for host/port/user attributes

The pymssql instrumentation's wrapped_connection() was setting
net.peer.name, net.peer.port, and db.user using hardcoded legacy
attribute keys, bypassing the semconv stability helpers introduced
in #4109.

Replace hardcoded keys with _set_db_user, _set_http_net_peer_name_client,
and _set_http_peer_port_client so that OTEL_SEMCONV_STABILITY_OPT_IN
correctly emits stable attributes (server.address, server.port, etc.).

Also updates existing test assertions for net.peer.port from string
to int, matching the behavior of set_int_attribute used by the helper.

* Update instrumentation/opentelemetry-instrumentation-pymssql/tests/test_pymssql_integration.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update instrumentation/opentelemetry-instrumentation-pymssql/tests/test_pymssql_integration.py

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Add changelog fragment for #4592

* Fix linting and add changelog fragment

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
L
Lukasz Ciukaj committed
a0c32513416b80f1c0209638c7be0c9c54c4ce72
Parent: c3b8e39
Committed by GitHub <noreply@github.com> on 5/18/2026, 2:40:39 PM