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: update api's to repect the new changes in attributes table #6526

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

nityanandagohain
Copy link
Member

@nityanandagohain nityanandagohain commented Nov 25, 2024

Fixes https://github.com/SigNoz/engineering-pod/issues/2032

Part of #5713

  • In the new schema changes for the traces exporter we removed the old logic of writing span_attributes. Where we wrote the hardcoded keys and their values to the span_attributes tables.

  • So even for the old query builder we are using the new function for suggestions of values where

    • For keys we use the fields from contants.
    • For values we get it from the respective columns.
  • had to update the depricated constants as they were are being used individually above.

  • Also added a fix where logs enrichment function was running for traces.


Important

Updated trace attribute handling to align with new schema and fixed logs enrichment bug.

  • Behavior:
    • GetTraceAggregateAttributes, GetTraceAttributeKeys, and GetTraceAttributeValues in reader.go now use new schema logic for trace attributes, removing old logic.
    • EnrichmentRequired in enrich_query.go fixed to correctly handle traces, not just logs.
  • Constants:
    • Added flags, name, and kind to DeprecatedStaticFieldsTraces in constants.go.
  • Misc:
    • Renamed GetTraceAggregateAttributesV2, GetTraceAttributeKeysV2, and GetTraceAttributeValuesV2 to remove V2 suffix in reader.go.

This description was created by Ellipsis for 6fadf9b. It will automatically update as commits are pushed.

@github-actions github-actions bot added the bug Something isn't working label Nov 25, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 6fadf9b in 43 seconds

More details
  • Looked at 307 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. pkg/query-service/app/logs/v3/enrich_query.go:21
  • Draft comment:
    The change from '&&' to '||' in the condition might be incorrect. It will now continue if either condition is true, which could lead to unintended behavior. Please verify if this change is intentional.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. pkg/query-service/app/clickhouseReader/reader.go:4117
  • Draft comment:
    Do not add non-ClickHouse related functions to the ClickHouseReader interface. Use the DAO in the telemetry instance to access such information instead. This is also applicable to other similar functions in this file.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_fvxG4HddeN0Z2FuO


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@nityanandagohain nityanandagohain merged commit b85f792 into develop Nov 25, 2024
20 checks passed
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.

2 participants