XiaoMi / ozhera

Application Observable Platform in the Cloud Native Era
https://ozhera.m.one.mi.com
Apache License 2.0
60 stars 28 forks source link

[Feature Request] Log Query Fails with Aliases Instead of Primary Key ID #333

Closed wtt40122 closed 1 month ago

wtt40122 commented 2 months ago

Description: Currently, our log query system does not support the use of aliases for searching logs, which is causing issues. When an alias is used instead of the primary key ID, the system is unable to retrieve the correct logs. This is problematic because it assumes that aliases are unique across the entire system, which is not always the case.

Steps to Reproduce:

1.Attempt to search for logs using an alias instead of the primary key ID. Observe that the query returns no results or incorrect results. Expected Behavior: 2.The system should be able to use aliases as a means to search for logs, understanding that they may not be unique and applying the correct context for the search.

Current Behavior: The system fails to return any results when an alias is used, assuming it must be unique and global.

Proposal: We should modify the log query system to allow the use of aliases, with the understanding that the search should be scoped to the relevant context rather than being global. This would make the system more flexible and user-friendly.

Use Cases:

Contextual Searching: Users should be able to search logs within a specific context or system where an alias might be unique, even if it's not globally unique. Improved User Experience: Allowing aliases would prevent confusion and increase efficiency for users who are accustomed to using them. Implementation Notes:

The system may need to be updated to handle alias resolution in a contextual manner. Considerations should be made for potential performance impacts and how to mitigate them.