Skip to content

fix: Alias server_name to device.name instead of server.address - #602

Merged
Lms24 merged 6 commits into
mainfrom
webb/alias-device-name
Aug 31, 2026
Merged

fix: Alias server_name to device.name instead of server.address#602
Lms24 merged 6 commits into
mainfrom
webb/alias-device-name

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

The server_name comes from socket.gethostname() in the transaction world.

The server_name is therefore the name of the machine running the Python program. This is not the server domain name or IP address as in the description of server.address. The former is a property of a machine, which may not be a web server. The latter is for web servers in Python integrations.

Related to getsentry/sentry-python#7311

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for apply_scrubbing (i.e. manual or auto. Use never only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Complete net.* aliases and transform net.transport by JPeer264 in #588
  • Name the replacements for the deprecated http.target by JPeer264 in #587
  • Add url.path.params.<key> (deprecated) in favor of url.path.parameter.<key> by JPeer264 in #586
  • Add graphql.source (deprecated) in favor of graphql.document by JPeer264 in #584
  • Add legacy Vercel AI span attributes (deprecated) by JPeer264 in #583
  • Add legacy AMQP and Redis span attributes (deprecated) by JPeer264 in #581
  • Add HTTP body size and status text attributes by msonnb in #574
  • Add graphql.processing.type by andreiborza in #572

Other

  • (descriptions) Add gen_ai span description inference rules by Lms24 in #578
  • (span-names) Add url.domainrule for http.client spans by Lms24 in #575

Bug Fixes 🐛

Names

  • Add gen_ai.function_id and gen_ai.pipeline.name to agent span name templates by RulaKhaled in #593
  • Add missing gen_ai ops to span name rules by Lms24 in #579
  • Include tool name in gen_ai.execute_tool span names by Lms24 in #580
  • Correct graphql span name examples by andreiborza in #573

Other

  • Alias server_name to device.name instead of server.address by alexander-alderman-webb in #602
  • Force use of Socket PyPI by sentrivana in #598

Internal Changes 🔧

  • (attributes) Add search alias for segment name by nsdeschenes in #577
  • (search-metadata) Add visibility field by nsdeschenes in #597

🤖 This preview updates automatically when you update the PR.

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review August 31, 2026 11:31
Comment thread model/attributes/device/device__name.json

@Lms24 Lms24 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.

I think this is one of those cases where we're probably inconsistent across SDKs in terms of how we treated the server_name attribute/span data. But it looks like in JS we never set this specific attribute, so I think this is fine. Let's merge and re-visit if it becomes a problem in other SDKs.

@Lms24
Lms24 enabled auto-merge (squash) August 31, 2026 12:33
@Lms24
Lms24 merged commit 2f5a498 into main Aug 31, 2026
17 checks passed
@Lms24
Lms24 deleted the webb/alias-device-name branch August 31, 2026 12:36
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.

2 participants