Skip to content

Lint to ensure that aliases are symmetric #48

Closed

Description

@mjq

Most of the time the alias field on an attribute is symmetric (i.e. if you look at the named alias, it will also have the name of the first attribute you were looking at as an alias).

But, that isn't always the case:

  • attribute gen_ai.prompt missing alias back to ai.input_messages
  • attribute code.lineno missing alias back to code.line.number
  • attribute client.address missing alias back to http.client_ip
  • attribute server.address missing alias back to http.host
  • attribute client.address missing alias back to http.host
  • attribute network.peer.address missing alias back to net.peer.ip
  • attribute network.peer.address missing alias back to net.sock.peer.addr
  • attribute http.route missing alias back to route
  • attribute http.url missing alias back to url

If alias is supposed to be symmetric, it seems like a lint in CI would be useful to make sure that these alias lists stay consistent between convention definitions.

If it isn't supposed to be symmetric, safe to close (but would be nice to document when it should be set and when it shouldn't be).

Activity

  1. AbhiPrasad commented on May 1, 2025

    @AbhiPrasad
    Contributor

    If it isn't supposed to be symmetric, safe to close (but would be nice to document when it should be set and when it shouldn't be).

    Ideally these attributes are symmetric, we should introduce linting in CI to catch these circumstances.

  2. AbhiPrasad commented on May 12, 2025

    @AbhiPrasad
    Contributor

    We need to change our data model to support this.

    The only exception to this is if an attribute splits into two separate attributes. We need to find another way to represent this in the schema.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions