Skip to content

ref: Ensure all aliases are symmetric#108

Merged
lcian merged 28 commits intomainfrom
lcian/alias-symmetric
Sep 4, 2025
Merged

ref: Ensure all aliases are symmetric#108
lcian merged 28 commits intomainfrom
lcian/alias-symmetric

Conversation

@lcian
Copy link
Member

@lcian lcian commented Aug 28, 2025

  • Adds a test to ensure aliases are symmetric.

  • Adds 2 more tests to ensure an attribute cannot be marked as replacement/alias of itself.

Addresses the inconsistencies found by the tests as follows:

  • Group: client.address, http.host, server.address
    • removed client.address from the list of aliases of http.host, otherwise client.address would need to be an alias for server.address, which makes no sense.
    • Note that http.host is deprecated in favor of server.address, and client.address will still exist as a separate concept.

For the remaining groups, I've added missing aliases and verified the aliases/deprecations are correct wrt OTEL.
List of groups where I added the missing aliases:

  • Group: http.url, url, url.full
  • Group http.server_name, net.host.name, server.address:
  • Group net.host.ip, net.sock.host.addr, network.local.address
  • Group http.flavor, net.protocol.version, network.protocol.version
  • Group net.peer.ip, network.peer.address
  • Group [net.sock.peer.addr, network.peer.address]:
  • Group [code.line.number, code.lineno]:
  • Group [ai.pipeline.name, gen_ai.pipeline.name]:
  • Group [ai.frequency_penalty, gen_ai.request.frequency_penalty]:
  • Group [ai.presence_penalty, gen_ai.request.presence_penalty]:
  • Group [ai.seed, gen_ai.request.seed]:
  • Group [ai.temperature, gen_ai.request.temperature]:
  • Group [ai.top_k, gen_ai.request.top_k]:
  • Group [ai.top_p, gen_ai.request.top_p]:
  • Group [ai.finish_reason, gen_ai.response.finish_reasons]:
  • Group [ai.generation_id, gen_ai.response.id]:
  • Group [ai.streaming, gen_ai.response.streaming]:
  • Group [ai.model.provider, gen_ai.system]:
  • Group [ai.function_call, gen_ai.tool.name]:
  • Group [ai.total_tokens.used, gen_ai.usage.total_tokens]:
  • Group [ai.input_messages, gen_ai.prompt, gen_ai.request.messages]:

Closes #48

@lcian lcian changed the title test: ensure all aliases are symmetric ref: ensure all aliases are symmetric Aug 29, 2025
Base automatically changed from lcian/all-materialized to main September 2, 2025 14:47
@lcian lcian changed the title ref: ensure all aliases are symmetric ref: Ensure all aliases are symmetric Sep 3, 2025
@lcian lcian marked this pull request as ready for review September 3, 2025 12:56
Copy link
Contributor

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

nice!

@lcian lcian merged commit 91155e5 into main Sep 4, 2025
5 checks passed
@lcian lcian deleted the lcian/alias-symmetric branch September 4, 2025 07:48
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.

Lint to ensure that aliases are symmetric

3 participants