Skip to content

ref: Assign server_name to the device.name attribute to avoid server.address conflicts - #7311

Draft
alexander-alderman-webb wants to merge 8 commits into
masterfrom
webb/disambiguate-server-address
Draft

ref: Assign server_name to the device.name attribute to avoid server.address conflicts#7311
alexander-alderman-webb wants to merge 8 commits into
masterfrom
webb/disambiguate-server-address

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Contributor

Description

The server.address attribute is populated by the server_name init option, as well as in integrations (e.g., in the WSGI integration). The server_name option falls back onto socket.gethostname().

In the current order, the integration value overwrites the server_name value. This value is less useful in the Sentry monolith (and could break queries on the server_name alias as there was no conflict in the transaction world).

The conventions for device.name are more narrow than server.address and align with socket.gethostname().

Issues

Closes PY-2731

Reminders

@linear-code

linear-code Bot commented Aug 31, 2026

Copy link
Copy Markdown

PY-2731

Comment thread sentry_sdk/scope.py
Comment thread sentry_sdk/consts.py
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review August 31, 2026 13:45
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner August 31, 2026 13:45
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

119467 passed | ⏭️ 6762 skipped | Total: 126229 | Pass Rate: 94.64% | Execution Time: 422m 9s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +20828
Passed Tests 📈 +20545
Failed Tests
Skipped Tests 📈 +283

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2485 uncovered lines.
✅ Project coverage is 90.3%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.27%    90.30%    +0.03%
==========================================
  Files          193       193         —
  Lines        25617     25619        +2
  Branches      9452      9452         —
==========================================
+ Hits         23125     23134        +9
- Misses        2492      2485        -7
- Partials      1435      1435         —

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant