Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dot support in attribute name #4121

Merged
merged 18 commits into from
Dec 21, 2023
Merged

fix: dot support in attribute name #4121

merged 18 commits into from
Dec 21, 2023

Conversation

nityanandagohain
Copy link
Member

@nityanandagohain nityanandagohain commented Nov 30, 2023

Summary

This PR adds the following support

  • Proper formatting of attributes names with . in order by and group by
  • In logs lines it doesn't return the _ attributes.
  • When a materialized column is created for an attribute with . in name it is replaced with $$. Eg:- request.method becomes attribute_string_request$$method
  • Doesn't return the duplicate underscore attributes in the getFields API
  • For checking exists we used indexOf(attr, key) > 0. Replaced it with has(attr, key) to make it consistant.
  • For update fields endpoint use default instead of materialzied

Related Issues / PR's

Fixes #3553

please look at SigNoz/signoz-otel-collector#233 first

clickhouse migration : SigNoz/signoz-db-migrations#8

Frontend changes required for this release #3681

Tested

  • For both index and non indexed values with and without dot in name
    • filtering
    • group by
    • order by is working
    • Formulas are working
  • Enrichment of queries are working fine
  • json queries are working as expected with no interference
  • limit queries

Blast radius

  • Alerts and Dhashboards and saved filters
  • If in any of the above the attribute name was actually containing . it must be updated within a month else it will start failing.

@github-actions github-actions bot added the bug Something isn't working label Nov 30, 2023
@nityanandagohain nityanandagohain changed the title fix: dot support fix: dot support in attribute name Nov 30, 2023
@nityanandagohain nityanandagohain marked this pull request as ready for review December 1, 2023 03:51
@srikanthccv
Copy link
Member

Test the formulas once.

@nityanandagohain
Copy link
Member Author

Have tested for formulas.

Also update the code to change the update fields fuctions to use Default instead of materialized.

@srikanthccv
Copy link
Member

Can you add a test for formula query?

@nityanandagohain
Copy link
Member Author

Thanks, @srikanthccv , yeah I tested only filters along with formulas, when testing in a group by it broke. Have fixed and added a test as well.

@srikanthccv
Copy link
Member

LGTM now; I can't of think any other case where it can fail. I will take another look and approve.

@nityanandagohain
Copy link
Member Author

Thanks, appreciate it

srikanthccv
srikanthccv previously approved these changes Dec 20, 2023
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

Please check time series chart dot attribute names with a limit applied once. Otherwise LGTM

@nityanandagohain
Copy link
Member Author

Yeah, right that got left out , have fixed it

@pranay01 pranay01 merged commit f8bb42a into develop Dec 21, 2023
11 checks passed
@pranay01
Copy link
Collaborator

Merged based on Nitya's request

@prashant-shahi prashant-shahi deleted the issue_3553 branch December 21, 2023 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LOGS] Use materialized column if present for JSON search.
4 participants